petsc-3.4.2 2013-07-02

# SNESLineSearchSetType

Sets the linesearch type

### Synopsis

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

### Input Parameters

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

### Available Types

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

Logically Collective on SNESLineSearch

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