petsc-3.7.7 2017-09-25
Report Typos and Errors

# SNESConvergedDefault

Convergence test of the solvers for systems of nonlinear equations (default).

### Synopsis

    #include "petsc/private/snesimpl.h"
    PetscErrorCode  SNESConvergedDefault(SNES snes,PetscInt it,PetscReal xnorm,PetscReal snorm,PetscReal fnorm,SNESConvergedReason *reason,void *dummy)

Collective on SNES

### Input Parameters

| snes | - the SNES context
| it | - the iteration (0 indicates before any Newton steps)
| xnorm | - 2-norm of current iterate
| snorm | - 2-norm of current step
| fnorm | - 2-norm of function at current iterate
| dummy | - unused context

### Output Parameter

reason -one of

     SNES_CONVERGED_FNORM_ABS       - (fnorm < abstol),

     SNES_CONVERGED_SNORM_RELATIVE  - (snorm < stol*xnorm),

     SNES_CONVERGED_FNORM_RELATIVE  - (fnorm < rtol*fnorm0),

     SNES_DIVERGED_FUNCTION_COUNT   - (nfct > maxf),

     SNES_DIVERGED_FNORM_NAN        - (fnorm == NaN),

     SNES_CONVERGED_ITERATING       - (otherwise),

where

| maxf | - maximum number of function evaluations, set with SNESSetTolerances()
| nfct | - number of function evaluations,
| abstol | - absolute function norm tolerance, set with SNESSetTolerances()
| rtol | - relative function norm tolerance, set with SNESSetTolerances()

### Keywords

SNES, nonlinear, default, converged, convergence

### See Also

SNESSetConvergenceTest()

Level:intermediate
Location:src/snes/interface/snesut.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/snes/examples/tutorials/ex30.c.html