Skip to main content
`Ctrl`+`K`

# SNESSetLineSearch

Sets the `SNESLineSearch` to be used for a given `SNES`

## Synopsis

    #include "petscsnes.h"
    #include "petscsnes.h"
    PetscErrorCode SNESSetLineSearch(SNES snes, SNESLineSearch linesearch)

Collective

## Input Parameters

- snes - iterative context obtained from `SNESCreate()`

- linesearch - the linesearch object

## Note

This is almost never used, rather one uses `SNESGetLineSearch()` to retrieve the line search and set options on it to configure it using the API).

## See Also

SNES: Nonlinear Solvers, `SNES`, `SNESLineSearch`, `SNESGetLineSearch()`

## Level

developer

## Location

src/snes/interface/snes.c

Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages