<div dir="ltr">I just noticed that the behaviour of a code like this<div><br></div><div>SNESSetType(snes,SNESASPIN)</div><div>SNESSetFromOptions(snes)<br><div><div><br></div><div>is not the same as </div><div><div><br></div><div>SNESSetType(snes,SNESNEWTONLS)</div><div>SNESSetFromOptions(snes)<br><div></div></div></div><div><br></div><div>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.</div><div><br></div><div>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?</div><div><br></div><div><br></div><div>-- <br></div><div class="gmail_signature">Stefano</div>
</div></div></div>