# TSComputeRHSJacobian

Computes the Jacobian matrix that has been set with TSSetRHSJacobian().

### Synopsis

    #include "petscts.h"
    PetscErrorCode PETSCTS_DLLEXPORT TSComputeRHSJacobian(TS ts,PetscReal t,Vec X,Mat *A,Mat *B,MatStructure *flg)

Collective on TS and Vec

### Input Parameters

| ts | - the SNES context
| t | - current timestep
| x | - input vector

### Output Parameters

| A | - Jacobian matrix
| B | - optional preconditioning matrix
| flag | - flag indicating matrix structure

### Notes

Most users should not need to explicitly call this routine, as it is used internally within the nonlinear solvers.

See KSPSetOperators() for important information about setting the flag parameter.

TSComputeJacobian() is valid only for TS_NONLINEAR

### Keywords

SNES, compute, Jacobian, matrix

### See Also

TSSetRHSJacobian(), KSPSetOperators()

Level:developer
Location:src/ts/interface/ts.c
Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages