SNESSetTolerances#
Sets SNES
various parameters used in convergence tests.
Synopsis#
#include "petscsnes.h"
PetscErrorCode SNESSetTolerances(SNES snes, PetscReal abstol, PetscReal rtol, PetscReal stol, PetscInt maxit, PetscInt maxf)
Logically Collective
Input Parameters#
snes - the
SNES
contextabstol - absolute convergence tolerance
rtol - relative convergence tolerance
stol - convergence tolerance in terms of the norm of the change in the solution between steps, || delta x || < stol*|| x ||
maxit - maximum number of iterations, default 50.
maxf - maximum number of function evaluations (use
PETSC_UNLIMITED
indicates no limit), default 10,000
Options Database Keys#
-snes_atol
- Setsabstol
-snes_rtol
- Setsrtol
-snes_stol
- Setsstol
-snes_max_it
- Setsmaxit
-snes_max_funcs
- Setsmaxf
(useunlimited
to have no maximum)
Note#
All parameters must be non-negative
Use PETSC_CURRENT
to retain the current value of any parameter and PETSC_DETERMINE
to use the default value for the given SNES
.
The default value is the value in the object when its type is set.
Use PETSC_UNLIMITED
on maxit
or maxf
to indicate there is no bound on the number of iterations or number of function evaluations.
Fortran Note#
Use PETSC_CURRENT_INTEGER
, PETSC_CURRENT_REAL
, PETSC_UNLIMITED_INTEGER
, PETSC_DETERMINE_INTEGER
, or PETSC_DETERMINE_REAL
See Also#
SNES: Nonlinear Solvers, SNESSolve()
, SNES
, SNESSetDivergenceTolerance()
, SNESSetForceIteration()
Level#
intermediate
Location#
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages