SNESLINESEARCHL2 — PETSc 3.22.5 documentation

Skip to main content
`Ctrl`+`K`

# SNESLINESEARCHL2

Secant search in the L2 norm of the function or the objective function, if it is provided with `SNESSetObjective()`. Attempts to solve \( \min_{\lambda} f(x + \lambda y) \) using the secant method with the initial bracketing of \( \lambda \) between [0,damping]. Differences of \(f()\) are used to approximate the first and second derivative of \(f()\) with respect to \(\lambda\), \(f'()\) and \(f''()\). The secant method is run for `maxit` iterations.

When an objective function is provided \(f(w)\) is the objective function otherwise \(f(w) = ||F(w)||^2\). \(x\) is the current step and \(y\) is the search direction.

This has no checks on whether the secant method is actually converging.

## Options Database Keys

- -snes_linesearch_max_it - maximum number of iterations, default is 1

- -snes_linesearch_maxstep - the algorithm insures that a step length is never longer than this value

- -snes_linesearch_damping - initial step is scaled back by this factor, default is 1.0

- -snes_linesearch_minlambda - minimum allowable lambda

## Developer Note

A better name for this method might be `SNESLINESEARCHSECANT`, L2 is not descriptive

## See Also

SNES: Nonlinear Solvers, `SNESLINESEARCHBT`, `SNESLINESEARCHCP`, `SNESLineSearch`, `SNESLineSearchType`, `SNESLineSearchCreate()`, `SNESLineSearchSetType()`

## Level

advanced

## Location

src/snes/linesearch/impls/l2/linesearchl2.c

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