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
