# SNESApplyNPC
Calls SNESSolve() on preconditioner for the SNES 
## Synopsis
```
#include "petscsnes.h"  
PetscErrorCode SNESApplyNPC(SNES snes, Vec x, Vec f, Vec y)
```
Collective


## Input Parameters

- ***snes -*** the SNES context
- ***x -*** input vector
- ***f -*** optional; the function evaluation on x



## Output Parameter

- ***y -*** function vector, as set by SNESSetFunction()



## Note
SNESComputeFunction() should be called on x before SNESApplyNPC() is called, as it is
with SNESComuteJacobian().




## See Also
 `SNESGetNPC()`, `SNESSetNPC()`, `SNESComputeFunction()`

## Level
developer

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


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