[petsc-users] adding calls before and after each iteration of snes

Barry Smith bsmith at petsc.dev
Tue May 25 14:24:57 CDT 2021

   There is also SNESMonitorSet() and SNESSetConvergenceTest(). 

> On May 25, 2021, at 9:25 AM, Matthew Knepley <knepley at gmail.com> wrote:
> On Tue, May 25, 2021 at 8:41 AM hg <hgbk2008 at gmail.com <mailto:hgbk2008 at gmail.com>> wrote:
> Hello
> I would like to ask if it is possible to add function call before and after each iteration of SNES solve, e.g. InitializeNonLinearIteration and FinalizeNonLinearIteration. It is particularly useful for debugging the constitutive law or for post-processing to post the intermediate results.
> There is this: https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESSetUpdate.html <https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESSetUpdate.html>
>   Thanks,
>     Matt
> Best
> Giang
> -- 
> 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
> https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210525/3d2998c4/attachment.html>

More information about the petsc-users mailing list