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

Stefano Zampini stefano.zampini at gmail.com
Tue May 25 14:29:11 CDT 2021


I use 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> and
 https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESLineSearchSetPostCheck.html

> On May 25, 2021, at 10:24 PM, Barry Smith <bsmith at petsc.dev> wrote:
> 
> 
>    There is also SNESMonitorSet() and SNESSetConvergenceTest(). 
> 
>> On May 25, 2021, at 9:25 AM, Matthew Knepley <knepley at gmail.com <mailto: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/43c047b7/attachment.html>


More information about the petsc-users mailing list