# SNESJacobianFunction
Function used by `SNES` to compute the nonlinear Jacobian of the function to be solved by `SNES` 
## Synopsis
```
#include "petscsnes.h"
PetscErrorCode SNESJacobianFunction(SNES snes,Vec x,Mat Amat,Mat Pmat,void *ctx);
```
Collective


## Input Parameters

- ***x -*** input vector, the Jacobian is to be computed at this value
- ***ctx -*** [optional] user-defined Jacobian context



## Output Parameters

- ***Amat -*** the matrix that defines the (approximate) Jacobian
- ***Pmat -*** the matrix to be used in constructing the preconditioner, usually the same as Amat.





## See Also
 `SNES`, `SNESSetFunction()`, `SNESGetFunction()`, `SNESSetJacobian()`, `SNESGetJacobian()`

## Level
intermediate

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