# SNESComputeNGS
Calls the Gauss-Seidel function that has been set with  `SNESSetNGS()`. 
## Synopsis
```
#include "petscsnes.h"  
PetscErrorCode SNESComputeNGS(SNES snes, Vec b, Vec x)
```
Collective


## Input Parameters

- ***snes -*** the `SNES` context
- ***x -*** input vector
- ***b -*** rhs vector



## Output Parameter

- ***x -*** new solution vector



## Note
`SNESComputeNGS()` is typically used within composed nonlinear solver
implementations, so most users would not generally call this routine
themselves.




## See Also
 `SNESNGS`, `SNESSetNGS()`, `SNESComputeFunction()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/interface/snes.c.html#SNESComputeNGS">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)  
