petsc-3.3-p7 2013-05-11

SNESLineSearchApply

Computes the line-search update.

Synopsis

#include "petscsnes.h" 
PetscErrorCode SNESLineSearchApply(SNESLineSearch linesearch, Vec X, Vec F, PetscReal * fnorm, Vec Y)
Collective on SNESLineSearch

Input Parameters

linesearch - The linesearch context
X - The current solution
F - The current function
fnorm - The current norm
Y - The search direction

Output Parameters

X - The new solution
F - The new function
fnorm - The new function norm

Options Database Keys

-snes_linesearch_type - basic, bt, l2, cp, shell
-snes_linesearch_monitor - Print progress of line searches
-snes_linesearch_damping - The linesearch damping parameter
-snes_linesearch_norms - Turn on/off the linesearch norms
-snes_linesearch_keeplambda - Keep the previous search length as the initial guess
-snes_linesearch_max_it - The number of iterations for iterative line searches

Notes

This is typically called from within a SNESSolve() implementation in order to help with convergence of the nonlinear method. Various SNES types use line searches in different ways, but the overarching theme is that a line search is used to determine an optimal damping parameter of a step at each iteration of the method. Each application of the line search may invoke SNESComputeFunction several times, and therefore may be fairly expensive.

Keywords

SNESLineSearch, Create

See Also

SNESLineSearchCreate(), SNESLineSearchPreCheck(), SNESLineSearchPostCheck(), SNESSolve(), SNESComputeFunction()

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