:orphan: # 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 [](ch_snes), `SNES`, `SNESGetSolution()`, `SNESGetFunction()`, `SNESComputeFunction()`, `SNESSetJacobian()`, `SNESSetFunction()` ## Level intermediate ## Location src/snes/interface/snes.c --- [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](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)