# TSComputeSNESJacobian
Compute the Jacobian needed for the `SNESSolve()` in `TS` 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSComputeSNESJacobian(TS ts, Vec x, Mat J, Mat Jpre)
```
Collective on ts


## Input Parameters

- ***ts -*** the `TS` context obtained from `TSCreate()`
- ***x -*** state vector



## Output Parameters

- ***J -*** Jacobian matrix
- ***Jpre -*** preconditioning matrix for J (may be same as J)





## Note
Uses finite differencing when `TS` Jacobian is not available.


## See Also
 `SNES`, `TS`, `SNESSetJacobian()`, TSSetRHSJacobian()`, `TSSetIJacobian()`

## Level
developer

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


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


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