# SNESLineSearchSetTolerances
Gets the tolerances for the linesearch.  These include tolerances for the relative and absolute change in the function norm, the change in lambda for iterative line searches, the minimum steplength, the maximum steplength, and the maximum number of iterations the line search procedure may take. 
## Synopsis
```
#include "petscsnes.h" 
PetscErrorCode SNESLineSearchSetTolerances(SNESLineSearch linesearch, PetscReal steptol, PetscReal maxstep, PetscReal rtol, PetscReal atol, PetscReal ltol, PetscInt max_its)
```
Collective


## Input Parameters

- ***linesearch -*** linesearch context
- ***steptol -*** The minimum steplength
- ***maxstep -*** The maximum steplength
- ***rtol    -*** The relative tolerance for iterative line searches
- ***atol    -*** The absolute tolerance for iterative line searches
- ***ltol    -*** The change in lambda tolerance for iterative line searches
- ***max_it  -*** The maximum number of iterations of the line search



## Note
The user may choose to not set any of the tolerances using `PETSC_DEFAULT` in
place of an argument.




## See Also
 `SNESLineSearch`, `SNESLineSearchGetTolerances()`

## Level
intermediate

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/linesearch/interface/linesearch.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)  
