Skip to main content
`Ctrl`+`K`

# SNESLineSearchSetLambda

Sets the line search `lambda` (scaling of the solution update)

## Synopsis

    #include "petscsnes.h"
    PetscErrorCode SNESLineSearchSetLambda(SNESLineSearch linesearch, PetscReal lambda)

## Input Parameters

- linesearch - line search context

- lambda - The `lambda` to use

## Note

This routine is typically used within implementations of `SNESLineSearchApply()` to set the final `lambda`. This routine (and `SNESLineSearchGetLambda()`) were added to facilitate Quasi-Newton methods that use the previous `lambda` as an inner scaling parameter.

## See Also

SNES: Nonlinear Solvers, `SNES`, `SNESLineSearch`, `SNESLineSearchGetLambda()`

## Level

advanced

## Location

src/snes/linesearch/interface/linesearch.c

Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages