:orphan:
# SNESLineSearchSetDamping
Sets the line search damping parameter. 
## Synopsis
```
#include "petscsnes.h" 
PetscErrorCode SNESLineSearchSetDamping(SNESLineSearch linesearch, PetscReal damping)
```

## Input Parameters

- ***linesearch -*** linesearch context
- ***damping -*** The damping parameter



## Options Database Key

- ***-snes_linesearch_damping <damping> -*** the damping value





## Note
The `SNESLINESEARCHNONE` line search merely takes the update step scaled by the damping parameter.
The use of the damping parameter in the l2 and cp line searches is much more subtle;
it is used as a starting point in calculating the secant step. However, the eventual
step may be of greater length than the damping parameter.  In the bt line search it is
used as the maximum possible step length, as the bt line search only backtracks.


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

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/linesearch/interface/linesearch.c.html#SNESLineSearchSetDamping">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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
