# SNESGetRhs
Gets the vector for solving F(x) = rhs. If rhs is not set it assumes a zero right hand side. 
## Synopsis
```
#include "petscsnes.h"  
PetscErrorCode SNESGetRhs(SNES snes, Vec *rhs)
```
Logically Collective


## Input Parameter

- ***snes -*** the `SNES` context



## Output Parameter

- ***rhs -*** the right hand side vector or NULL if the right hand side vector is null





## See Also
 `SNES`, `SNESGetSolution()`, `SNESGetFunction()`, `SNESComputeFunction()`, `SNESSetJacobian()`, `SNESSetFunction()`

## Level
intermediate

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/interface/snes.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)  
