[petsc-dev] ASPIN and SNESSetType

Matthew Knepley knepley at gmail.com
Thu Oct 1 12:43:54 CDT 2015


On Thu, Oct 1, 2015 at 7:42 AM, Stefano Zampini <stefano.zampini at gmail.com>
wrote:

> 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?
>

I wish Peter had not done it this way. His reason was that a special
Jacobian action can be defined for
Newton -L NASM, but we should just do this with a flag rather than a new
SNES type.

   Matt


>
> --
> Stefano
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20151001/51676bbe/attachment.html>


More information about the petsc-dev mailing list