SNESSetConvergenceTest

Sets the function that is to be used to test for convergence of the nonlinear iterative solution.

Synopsis

int SNESSetConvergenceTest(SNES snes,int (*func)(SNES,double,double,double,void*),void *cctx)
Collective on SNES

Input Parameters

snes - the SNES context
func - routine to test for convergence
cctx - [optional] context for private data for the convergence routine (may be PETSC_NULL)

Calling sequence of func

    int func (SNES snes,double xnorm,double gnorm,double f,void *cctx)

snes - the SNES context
cctx - [optional] convergence context
xnorm - 2-norm of current iterate
gnorm - 2-norm of current step (SNES_NONLINEAR_EQUATIONS methods)
f - 2-norm of function (SNES_NONLINEAR_EQUATIONS methods)
gnorm - 2-norm of current gradient (SNES_UNCONSTRAINED_MINIMIZATION methods)
f - function value (SNES_UNCONSTRAINED_MINIMIZATION methods)

Keywords

SNES, nonlinear, set, convergence, test

See Also

SNESConverged_EQ_LS(), SNESConverged_EQ_TR(),
SNESConverged_UM_LS(), SNESConverged_UM_TR()

Location: src/snes/interface/snes.c
SNES Index
Table of Contents