SNESGetTolerances — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# SNESGetTolerances

Gets various parameters used in `SNES` convergence tests.

## Synopsis

    #include "petscsnes.h"
    PetscErrorCode SNESGetTolerances(SNES snes, PetscReal *atol, PetscReal *rtol, PetscReal *stol, PetscInt *maxit, PetscInt *maxf)

Not Collective

## Input Parameter

- snes - the `SNES` context

## Output Parameters

- atol - the absolute convergence tolerance

- rtol - the relative convergence tolerance

- stol - convergence tolerance in terms of the norm of the change in the solution between steps

- maxit - the maximum number of iterations allowed

- maxf - the maximum number of function evaluations allowed, `PETSC_UNLIMITED` indicates no bound

## Notes

See `SNESSetTolerances()` for details on the parameters.

The user can specify `NULL` for any parameter that is not needed.

## See Also

SNES: Nonlinear Solvers, `SNES`, `SNESSetTolerances()`

## Level

intermediate

## Location

src/snes/interface/snes.c

## Examples

src/snes/tutorials/ex2.c
src/snes/tutorials/ex35.c
src/snes/tutorials/ex3k.kokkos.cxx
src/snes/tutorials/ex3.c

Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages