TSForwardSetSensitivities#
Sets the initial value of the trajectory sensitivities of solution w.r.t. the problem parameters and initial values.
Synopsis#
#include <petscts.h>
PetscErrorCode TSForwardSetSensitivities(TS ts, PetscInt nump, Mat Smat)
Logically Collective
Input Parameters#
Notes#
Use PETSC_DETERMINE
to use the number of columns of Smat
for nump
Forward sensitivity is also called ‘trajectory sensitivity’ in some fields such as power systems.
This function turns on a flag to trigger TSSolve()
to compute forward sensitivities automatically.
You must call this function before TSSolve()
.
The entries in the sensitivity matrix must be correctly initialized with the values S = dy/dp|startingtime.
See Also#
TS: Scalable ODE and DAE Solvers, TSForwardGetSensitivities()
, TSForwardSetIntegralGradients()
, TSForwardGetIntegralGradients()
, TSForwardStep()
Level#
beginner
Location#
Examples#
src/ts/tutorials/ex20fwd.c
src/ts/tutorials/ex16fwd.c
src/ts/tutorials/ex23fwdadj.c
Index of all Sensitivity routines
Table of Contents for all manual pages
Index of all manual pages