:orphan:
# SNESLineSearchSetFunction
Sets the function evaluation used by the `SNES` line search ` Input Parameters: .  linesearch - the `SNESLineSearch` context +  func       - function evaluation routine, this is usually the function provided with `SNESSetFunction()` 
## Synopsis
```
#include "petscsnes.h" 
PetscErrorCode SNESLineSearchSetFunction(SNESLineSearch linesearch, PetscErrorCode (*func)(SNES, Vec, Vec))
```



## See Also
 `SNESLineSearch`, `SNESGetLineSearch()`, `SNESSetFunction()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/linesearch/interface/linesearch.c.html#SNESLineSearchSetFunction">src/snes/linesearch/interface/linesearch.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/linesearch/interface/linesearch.c)


[Index of all SNES routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
