[petsc-dev] DMGetMatrix --> DMGetMatrices?
Jed Brown
jedbrown at mcs.anl.gov
Fri Feb 10 16:28:53 CST 2012
On Fri, Feb 10, 2012 at 16:13, Dmitry Karpeev <karpeev at mcs.anl.gov> wrote:
> Well, two is the number that's used in KSP and SNES.
>
DM can be used outside of KSP and SNES.
It may well make sense to have J and Jpre corresponding to the implicit
part of an equation plus a "mass matrix" to be used for "explicit stages"
in an IMEX method. That is three (or even four if the mass matrix needs a
preconditioner) extracted from the same DM (in different solves).
>
> With the current API SNES actually uses the same matrix for the Jacobian
> and preconditioner, if the matrix is obtained from a DM, which is limiting.
> It is natural to have a "geometric" backend (e.g., libMesh or MOOSE)
> interact with the algebraic objects (PETSc's SNES, KSP) through the DM as
> much as possible, since the DM (its impl, rather) carries all of the
> necessary mesh and discretization information in one place. Yet, currently
> this interaction is limited as compared to the "bare" SNES/KSP interface,
> in part because of the one matrix limitation.
>
I agree that it's clumsy that -snes_mf_operator is the only "nice" way to
get matrix-free in some cases, and it only gives you one kind of
matrix-free.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120210/ae810e80/attachment.html>
More information about the petsc-dev
mailing list