# SNESLineSearchSetParams

Sets the parameters associated with the line search routine in the Newton-based method SNESLS.

### Synopsis

    #include "petscsnes.h"
    PetscErrorCode PETSCSNES_DLLEXPORT SNESLineSearchSetParams(SNES snes,PetscReal alpha,PetscReal maxstep,PetscReal steptol)

Collective on SNES

### Input Parameters

| snes | - The nonlinear context obtained from SNESCreate()
| alpha | - The scalar such that .5*f_{n+1} . f_{n+1} <= .5*f_n . f_n - alpha |f_n . J . f_n|
| maxstep | - The maximum norm of the update vector
| steptol | - The minimum norm fraction of the original step after scaling

### Note

Pass in PETSC_DEFAULT for any parameter you do not wish to change.

We are finding the zero of f() so the one dimensional minimization problem we are solving in the line search is minimize .5*f(x_n + lambda*step_direction) . f(x_n + lambda*step_direction)

Contributed by: Mathew Knepley

### Keywords

SNES, nonlinear, set, line search params

### See Also

SNESLineSearchGetParams(), SNESLineSearchSet()

Level:intermediate
Location: src/snes/impls/ls/lsparams.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages