Justin Chang <jychan...@gmail.com> writes:

> So when would I use one over the other?
>
> - If I wanted to solve a problem using a direct solver or an iterative
> solver without a preconditioner, I would use A = J?
>
> - The documentation for SNESSetJacobian() says that AMat and PMat are
> usually the same, but if I used something like GAMG would I need to create
> two different objects/Mats?

It is a semantic distinction that has nothing to do with the
preconditioning algorithm.

If you define the operator that you want to solve with using a
matrix-free implementation (could be MFFD, could be some fast evaluation
that doesn't store matrix entries), but want to use an assembled
operator for preconditioning, then you pass a different matrix.  If you
use a different discretization to define the operator versus the
preconditioner, then you would pass different matrices.  This happens,
for example, when preconditioning using a low-order discretization
and/or dropping some coupling terms that are deemed unimportant for
preconditioning.

Attachment: signature.asc
Description: PGP signature

Reply via email to