# SNESLineSearchGetLambda
Gets the last linesearch steplength discovered. 
## Synopsis
```
#include "petscsnes.h" 
PetscErrorCode SNESLineSearchGetLambda(SNESLineSearch linesearch, PetscReal *lambda)
```
Not Collective


## Input Parameters

- ***linesearch -*** linesearch context



## Output Parameters

- ***lambda -*** The last steplength computed during `SNESLineSearchApply()`





## Note
This is useful in methods where the solver is ill-scaled and
requires some adaptive notion of the difference in scale between the
solution and the function.  For instance, `SNESQN` may be scaled by the
line search lambda using the argument -snes_qn_scaling ls.


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

## Level
advanced

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