:orphan:
# SNESNGSSetTolerances
Sets various parameters used in convergence tests for nonlinear Gauss-Seidel `SNESNCG` 
## Synopsis
```
#include "petscsnes.h"  
PetscErrorCode SNESNGSSetTolerances(SNES snes, PetscReal abstol, PetscReal rtol, PetscReal stol, PetscInt maxit)
```
Logically Collective


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



## Options Database Keys

- ***-snes_ngs_atol <abstol> -*** Sets abstol
- ***-snes_ngs_rtol <rtol> -*** Sets rtol
- ***-snes_ngs_stol <stol> -*** Sets stol
- ***-snes_max_it <maxit> -*** Sets maxit





## See Also
 `SNESNCG`, `SNESSetTrustRegionTolerance()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/impls/gs/snesgs.c.html#SNESNGSSetTolerances">src/snes/impls/gs/snesgs.c</A>


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


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