petsc-3.7.1 2016-05-15
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 Many br

### Input Parameters

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

### Output Parameter

reason -one of Many br

     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 Many br

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

Many br

### 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