#include <petscsnes.h> $ PetscErrorCode SNESConvergenceTest(SNES snes,PetscInt it,PetscReal xnorm,PetscReal gnorm,PetscReal f,SNESConvergedReason *reason,void *cctx)Collective on snes
snes | - the SNES context | |
it | - current iteration (0 is the first and is before any Newton step) | |
xnorm | - 2-norm of current iterate | |
gnorm | - 2-norm of current step | |
f | - 2-norm of function | |
cctx | - [optional] convergence context |
reason | - reason for convergence/divergence, only needs to be set when convergence or divergence is detected |