[petsc-users] some questions about snes

Jed Brown jed at jedbrown.org
Fri Feb 21 23:44:16 CST 2014


Fande Kong <fd.kong at siat.ac.cn> writes:

> (1) The snes can solve my nonlinear problem with a default Jacobian
> provided in the Petsc using finite differences, but this method may cause
> some new nonzero allocations for the preallocated matrix.

Why are there new nonzeros?  This must mean preallocation was incorrect.

> (2) A Matrix-free version of snes also works well for my nonlinear problem,
> but it does not allow me to apply a  preconditioner. What kind of
> algorithms are used for the matrix-free snes?

There are solvers like FAS that can be used as nonlinear solvers or
nonlinear preconditioners (for accelerators like NGMRES).  If
matrix-based preconditioners work well for you, it would be common to
assemble a simpler matrix for preconditioning and apply the accurate
Jacobian matrix-free.  In PETSc, you can do this by simply assembling
your approximate Jacobian and running with -snes_mf_operator.  There are
several other ways for working with approximate Jacobians, but try this
first.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140221/a9ce0f0a/attachment.pgp>


More information about the petsc-users mailing list