[petsc-dev] ASPIN and SNESSetType

Stefano Zampini stefano.zampini at gmail.com
Thu Oct 1 07:42:19 CDT 2015


I just noticed that the behaviour of a code like this

SNESSetType(snes,SNESASPIN)
SNESSetFromOptions(snes)

is not the same as

SNESSetType(snes,SNESNEWTONLS)
SNESSetFromOptions(snes)

when -snes_type newtonls is specified at command line. In both cases, the
snes will be of type SNESNEWTONLS, but in the first case, the snes object
will also have a nonlinear preconditioner embedded in, since SNESASPIN
creates snes->pc, and there's no SNESDestroy_ASPIN.

What is the correct approach to fix this? Should the nonlinear
preconditioner be destroyed by the SNESSetType interface or by the specific
implementation of ASPIN?


-- 
Stefano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20151001/656fd303/attachment.html>


More information about the petsc-dev mailing list