petsc-3.12.5 2020-03-29
Report Typos and Errors

SNESSetTolerances

Sets 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 on SNES

Input Parameters

snes - the SNES context
abstol - 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
maxf - maximum number of function evaluations (-1 indicates no limit)

Options Database Keys

-snes_atol <abstol> - Sets abstol
-snes_rtol <rtol> - Sets rtol
-snes_stol <stol> - Sets stol
-snes_max_it <maxit> - Sets maxit
-snes_max_funcs <maxf> - Sets maxf

Notes

The default maximum number of iterations is 50. The default maximum number of function evaluations is 1000.

See Also

SNESSetTrustRegionTolerance(), SNESSetDivergenceTolerance(), SNESSetForceIteration()

Level

intermediate

Location

src/snes/interface/snes.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages