Skip to main content
`Ctrl`+`K`

# SNESLineSearchSetDamping

Sets the line search damping parameter.

## Synopsis

    #include "petscsnes.h"
    PetscErrorCode SNESLineSearchSetDamping(SNESLineSearch linesearch, PetscReal damping)

## Input Parameters

- linesearch - the line search 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 `SNESLINESEARCHSECANT` and `SNESLINESEARCHCP` line searches is much more subtle; it is used as a starting point for the secant method. Depending on the choice for `maxlambda`, the eventual `lambda` may be greater than the damping parameter however. For `SNESLINESEARCHBISECTION` and `SNESLINESEARCHBT` the damping is instead used as the initial guess, below which the line search will not go. Hence, it is the maximum possible value for `lambda`.

## See Also

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

## Level

intermediate

## Location

src/snes/linesearch/interface/linesearch.c

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