# SNESTSFormJacobian
Function to evaluate the Jacobian 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode SNESTSFormJacobian(SNES snes, Vec U, Mat A, Mat B, void *ctx)
```
Collective


## Input Parameters

- ***snes -*** nonlinear solver
- ***U -*** the current state at which to evaluate the residual
- ***ctx -*** user context, must be a `TS`



## Output Parameters

- ***A -*** the Jacobian
- ***B -*** the preconditioning matrix (may be the same as A)





## Note
This function is not normally called by users and is automatically registered with the `SNES` used by `TS`.


## See Also
 [](chapter_ts), `SNESSetJacobian()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/interface/ts.c.html#SNESTSFormJacobian">src/ts/interface/ts.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/arkimex/arkimex.c.html#SNESTSFormJacobian_ARKIMEX">SNESTSFormJacobian_ARKIMEX in src/ts/impls/arkimex/arkimex.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/bdf/bdf.c.html#SNESTSFormJacobian_BDF">SNESTSFormJacobian_BDF in src/ts/impls/bdf/bdf.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/eimex/eimex.c.html#SNESTSFormJacobian_EIMEX">SNESTSFormJacobian_EIMEX in src/ts/impls/eimex/eimex.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/explicit/rk/rk.c.html#SNESTSFormJacobian_RK">SNESTSFormJacobian_RK in src/ts/impls/explicit/rk/rk.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/glee/glee.c.html#SNESTSFormJacobian_GLEE">SNESTSFormJacobian_GLEE in src/ts/impls/glee/glee.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/alpha/alpha1.c.html#SNESTSFormJacobian_Alpha">SNESTSFormJacobian_Alpha in src/ts/impls/implicit/alpha/alpha1.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/alpha/alpha2.c.html#SNESTSFormJacobian_Alpha">SNESTSFormJacobian_Alpha in src/ts/impls/implicit/alpha/alpha2.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/discgrad/tsdiscgrad.c.html#SNESTSFormJacobian_DiscGrad">SNESTSFormJacobian_DiscGrad in src/ts/impls/implicit/discgrad/tsdiscgrad.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/glle/glle.c.html#SNESTSFormJacobian_GLLE">SNESTSFormJacobian_GLLE in src/ts/impls/implicit/glle/glle.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/irk/irk.c.html#SNESTSFormJacobian_IRK">SNESTSFormJacobian_IRK in src/ts/impls/implicit/irk/irk.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/theta/theta.c.html#SNESTSFormJacobian_Theta">SNESTSFormJacobian_Theta in src/ts/impls/implicit/theta/theta.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/mimex/mimex.c.html#SNESTSFormJacobian_Mimex">SNESTSFormJacobian_Mimex in src/ts/impls/mimex/mimex.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/pseudo/posindep.c.html#SNESTSFormJacobian_Pseudo">SNESTSFormJacobian_Pseudo in src/ts/impls/pseudo/posindep.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/rosw/rosw.c.html#SNESTSFormJacobian_RosW">SNESTSFormJacobian_RosW in src/ts/impls/rosw/rosw.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/interface/ts.c)


[Index of all TS routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
