Re: [petsc-dev] DMGetMatrix --> DMGetMatrices?
On Fri, Feb 10, 2012 at 4:00 PM, Jed Brown <[email protected]> wrote:
On Fri, Feb 10, 2012 at 15:58, Dmitry Karpeev <[email protected]> wrote:
It seems to me that the sparsity pattern (and even the type of the matrices) is up to the particular DM type, so it is, in principle, opaque. DMDA can control it by manipulating stencil width or widths, while FEM-oriented DM types (e.g., libMesh) could control it via the element type, etc. The generic DM interface doesn't have a way to specify the sparsity pattern. As it should be, in my opinion.
Yes, it's fine for DM to have a way to allocate a sparser preconditioning matrix. The most common case in practice is MFFD for the true Jacobian and more compact stencil for the preconditioner. It just makes the interface and implementation a bit ugly/confusing to support both. It would be nice to have a more elegant way to state it.
No uglier than having SNES/KSP take in two matrices, in my view. Dmitry.
participants (1)
-
Dmitry Karpeev