:orphan: # TSSetIJacobianP Sets the function that computes the Jacobian of F w.r.t. the parameters P where F(Udot,U,t) = G(U,P,t), as well as the location to store the matrix. ## Synopsis ``` #include "petscts.h" PetscErrorCode TSSetIJacobianP(TS ts, Mat Amat, PetscErrorCode (*func)(TS, PetscReal, Vec, Vec, PetscReal, Mat, void *), void *ctx) ``` Logically Collective ## Input Parameters - ***ts -*** `TS` context obtained from `TSCreate()` - ***Amat -*** JacobianP matrix - ***func -*** function - ***ctx -*** [optional] user-defined function context ## Calling sequence of `func` ```none PetscErrorCode func(TS ts, PetscReal t, Vec y, Mat A, void *ctx) ``` - ***t -*** current timestep - ***U -*** input vector (current ODE solution) - ***Udot -*** time derivative of state vector - ***shift -*** shift to apply, see note below - ***A -*** output matrix - ***ctx -*** [optional] user-defined 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 [](ch_ts), `TSSetRHSJacobianP()`, `TS` ## Level intermediate ## Location src/ts/interface/sensitivity/tssen.c ## Examples src/ts/tutorials/ex20adj.c
src/ts/tutorials/ex23fwdadj.c
--- [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](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)