petsc-3.7.1 2016-05-15
Report Typos and Errors

# 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 Many br

### Input Parameters

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

### Output Parameters

| X | - The new solution Many br
| F | - The new function Many br
| fnorm | - The new function norm Many br

### Options Database Keys

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

### Notes

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

Many br

### 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