:orphan:
# TSGetRHSJacobian
Returns the Jacobian J at the present timestep. 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSGetRHSJacobian(TS ts, Mat *Amat, Mat *Pmat, TSRHSJacobian *func, void **ctx)
```
Not Collective, but parallel objects are returned if ts is parallel


## Input Parameter

- ***ts  -*** The `TS` context obtained from `TSCreate()`



## Output Parameters

- ***Amat -*** The (approximate) Jacobian J of G, where U_t = G(U,t)  (or `NULL`)
- ***Pmat -*** The matrix from which the preconditioner is constructed, usually the same as `Amat`  (or `NULL`)
- ***func -*** Function to compute the Jacobian of the RHS  (or `NULL`)
- ***ctx -*** User-defined context for Jacobian evaluation routine  (or `NULL`)





## Note
You can pass in `NULL` for any return argument you do not need.


## See Also
 [](ch_ts), `TS`, `TSGetTimeStep()`, `TSGetMatrices()`, `TSGetTime()`, `TSGetStepNumber()`


## Level
intermediate

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex4.c.html">src/ts/tutorials/ex4.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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
