Skip to main content
`Ctrl`+`K`

# TSSetRHSJacobianP

Sets the function that computes the Jacobian of \(G\) w.r.t. the parameters \(p\) where \(U_t = G(U,p,t)\), as well as the location to store the matrix.

## Synopsis

    #include <petscts.h>
    PetscErrorCode TSSetRHSJacobianP(TS ts, Mat Amat, TSRHSJacobianPFn *func, PetscCtx ctx)

Logically Collective

## Input Parameters

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

- Amat - JacobianP matrix

- func - function

- ctx - [optional] function context

## Note

`Amat` has the same number of rows and the same row parallel layout as `u`, `Amat` has the same number of columns and parallel layout as `p`

## See Also

TS: Scalable ODE and DAE Solvers, `TS`, `TSRHSJacobianPFn`, `TSGetRHSJacobianP()`

## Level

intermediate

## Location

src/ts/interface/sensitivity/tssen.c

## Examples

src/ts/tutorials/ex20opt_p.c
src/ts/tutorials/ex20adj.c
src/ts/tutorials/ex16fwd.c
src/ts/tutorials/ex20td.c
src/ts/tutorials/ex20fwd.c

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