There is also SNESMonitorSet() and SNESSetConvergenceTest(). 

> On May 25, 2021, at 9:25 AM, Matthew Knepley <[email protected]> wrote:
> 
> On Tue, May 25, 2021 at 8:41 AM hg <[email protected] 
> <mailto:[email protected]>> 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/>

Reply via email to