[petsc-users] Setting/creating Mats for SNES use
Jed Brown
jed at jedbrown.org
Mon Nov 2 15:02:08 CST 2015
Justin Chang <jychang48 at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20151102/0fdebc79/attachment.pgp>
More information about the petsc-users
mailing list