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

# SNESLineSearchSetType

Sets the linesearch type

### Synopsis

    #include "petscsnes.h"
    PetscErrorCode SNESLineSearchSetType(SNESLineSearch linesearch, SNESLineSearchType type)

Logically Collective on SNESLineSearch Many br

### Input Parameters

| linesearch | - linesearch context Many br
| type | - The type of line search to be used Many br

### Available Types

| basic | - Simple damping line search. Many br
| bt | - Backtracking line search over the L2 norm of the function Many br
| l2 | - Secant line search over the L2 norm of the function Many br
| cp | - Critical point secant line search assuming F(x) = grad G(x) for some unknown G(x) Many br
| nleqerr | - Affine-covariant error-oriented linesearch Many br
| shell | - User provided SNESLineSearch implementation Many br

Many br

### See Also

SNESLineSearchCreate()

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

### Examples

src/snes/examples/tutorials/ex1f.F.html
src/ts/examples/tutorials/ex22.c.html
src/ts/examples/tutorials/ex22f.F.html