# SNESLineSearchSetVecs
Sets the vectors on the `SNESLineSearch` context 
## Synopsis
```
#include "petscsnes.h" 
PetscErrorCode SNESLineSearchSetVecs(SNESLineSearch linesearch, Vec X, Vec F, Vec Y, Vec W, Vec G)
```
Logically Collective


## Input Parameters

- ***linesearch -*** linesearch context
- ***X -*** Solution vector
- ***F -*** Function vector
- ***Y -*** Search direction vector
- ***W -*** Solution work vector
- ***G -*** Function work vector





## See Also
 `SNESLineSearch`, `SNESLineSearchSetNorms()`, `SNESLineSearchGetVecs()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/linesearch/interface/linesearch.c.html#SNESLineSearchSetVecs">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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
