PetscErrorCode SNESLineSearchQuadratic(SNES snes,void *lsctx,Vec x,Vec f,Vec g,Vec y,Vec w,PetscReal fnorm,PetscReal xnorm,PetscReal *ynorm,PetscReal *gnorm,PetscBool *flag)Collective on SNES and Vec
| 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 | |
| xnorm | - norm of x if known, otherwise 0 |
| g | - residual evaluated at new iterate w | |
| w | - new iterate (x + lambda*y) | |
| gnorm | - 2-norm of g | |
| ynorm | - 2-norm of search length | |
| flag | - PETSC_TRUE if line search succeeds; PETSC_FALSE on failure. |
| -snes_ls quadratic | - Activates SNESLineSearchQuadratic() | |
| -snes_ls_alpha <alpha> | - Sets alpha | |
| -snes_ls_maxstep <maxstep> | - Sets the maximum stepsize the line search will use (if the 2-norm(y) > maxstep then scale y to be y = (maxstep/2-norm(y)) *y) | |
| -snes_ls_minlambda <minlambda> | - Sets the minimum lambda the line search will use minlambda/ max_i ( y[i]/x[i] ) |
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