# SNESGetTolerances
Gets various parameters used in convergence tests. 
## Synopsis
```
#include "petscsnes.h"  
PetscErrorCode SNESGetTolerances(SNES snes, PetscReal *atol, PetscReal *rtol, PetscReal *stol, PetscInt *maxit, PetscInt *maxf)
```
Not Collective


## Input Parameters

- ***snes -*** the `SNES` context
- ***atol -*** absolute convergence tolerance
- ***rtol -*** relative convergence tolerance
- ***stol -*** convergence tolerance in terms of the norm
of the change in the solution between steps
- ***maxit -*** maximum number of iterations
- ***maxf -*** maximum number of function evaluations



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




## See Also
 `SNES`, `SNESSetTolerances()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/interface/snes.c.html#SNESGetTolerances">src/snes/interface/snes.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex2.c.html">src/snes/tutorials/ex2.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex3.c.html">src/snes/tutorials/ex3.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex35.c.html">src/snes/tutorials/ex35.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex3k.kokkos.cxx.html">src/snes/tutorials/ex3k.kokkos.cxx.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/interface/snes.c)


[Index of all SNES routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
