SNESLineSearchQuadratic

Performs a quadratic line search.

Synopsis

PetscErrorCode PETSCSNES_DLLEXPORT SNESLineSearchQuadratic(SNES snes,void *lsctx,Vec x,Vec f,Vec g,Vec y,Vec w,PetscReal fnorm,PetscReal *ynorm,PetscReal *gnorm,PetscTruth *flag)
Collective on SNES and Vec

Input Parameters

snes - the SNES context
lsctx - optional context for line search (not used here)
x - current iterate
f - residual evaluated at x
y - search direction
w - work vector
fnorm - 2-norm of f

Output Parameters

g - residual evaluated at new iterate w
w - new iterate (x + alpha*y)
gnorm - 2-norm of g
ynorm - 2-norm of search length
flag - PETSC_TRUE if line search succeeds; PETSC_FALSE on failure.

Options Database Keys

-snes_ls quadratic - Activates SNESLineSearchQuadratic()
-snes_ls_alpha <alpha> - Sets alpha
-snes_ls_maxstep <max> - Sets maxstep
-snes_ls_steptol <steptol> - Sets steptol, this is the minimum step size that the line search code will accept; min p[i]/x[i] < steptol. The -snes_stol <stol> is the minimum step length the default convergence test will use and is based on 2-norm(p) < stol*2-norm(x) Notes: Use SNESLineSearchSet() to set this routine within the SNESLS method.

Keywords

SNES, nonlinear, quadratic, line search

See Also

SNESLineSearchCubic(), SNESLineSearchNo(), SNESLineSearchSet(), SNESLineSearchNoNorms()

Level:advanced
Location:
src/snes/impls/ls/ls.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages