# SNESLineSearchSetComputeNorms
Turns on or off the computation of final norms in the line search. 
## Synopsis
```
#include "petscsnes.h" 
PetscErrorCode SNESLineSearchSetComputeNorms(SNESLineSearch linesearch, PetscBool flg)
```

## Input Parameters

- ***linesearch  -*** linesearch context
- ***flg  -*** indicates whether or not to compute norms



## Options Database Keys

- ***-snes_linesearch_norms <true> -*** Turns on/off computation of the norms for basic (none) linesearch



## Note
This is most relevant to the `SNESLINESEARCHBASIC` (or equivalently `SNESLINESEARCHNONE`) line search type since most line searches have a stopping criteria involving the norm.




## See Also
 `SNESLineSearch`, `SNESLineSearchGetNorms()`, `SNESLineSearchSetNorms()`, `SNESLineSearchComputeNorms()`, `SNESLINESEARCHBASIC`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/linesearch/interface/linesearch.c.html#SNESLineSearchSetComputeNorms">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)  
