[petsc-users] how to exit in SNES iteration
WANG, LEI
lei.wang at durham.ac.uk
Fri Jun 29 06:07:10 CDT 2018
Dear all
I am writing a code for nonlinear mechanical problem with SNES. The code often stops inside of the iterations when computing the Jacobian or Function. I would like to force the code exit once some abnormal value appears, but do not know what function to use? I have tried to set the residual norm to a large value, iteration number to a large value, but seems those not work. What should I write in 'if(abnormal) ???' for exiting SNES iteration in the functions FormJacobian or FormFunction?
Cheers
Lei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180629/1973b6c8/attachment.html>
More information about the petsc-users
mailing list