TSComputeRHSJacobianConstant — PETSc 3.25.2 documentation

Skip to main content
`Ctrl`+`K`

# TSComputeRHSJacobianConstant

Reuses a Jacobian that is time-independent.

## Synopsis

    #include "petscts.h"
    PetscErrorCode TSComputeRHSJacobianConstant(TS ts, PetscReal t, Vec U, Mat A, Mat B, PetscCtx ctx)

Collective

## Input Parameters

- ts - time stepping context

- t - time at which to evaluate

- U - state at which to evaluate

- ctx - context

## Output Parameters

- A - Jacobian

- B - matrix used to construct the preconditioner, often the same as `A`

## Note

This function is intended to be passed to `TSSetRHSJacobian()` to evaluate the Jacobian for linear time-independent problems.

## See Also

TS: Scalable ODE and DAE Solvers, `TS`, `TSSetRHSFunction()`, `TSSetRHSJacobian()`, `TSComputeRHSFunctionLinear()`

## Level

intermediate

## Location

src/ts/interface/ts.c

## Examples

src/ts/tutorials/ex6.c
src/ts/tutorials/ex4.c
src/ts/tutorials/ex3.c
src/tao/unconstrained/tutorials/spectraladjointassimilation.c
src/ts/tutorials/ex74.c
src/ts/tutorials/ex5.c

Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages