#include "petscts.h" PetscErrorCode TSSetCostGradients(TS ts,PetscInt numcost,Vec *lambda,Vec *mu)Logically Collective on TS and Vec
ts | - the TS context obtained from TSCreate() | |
lambda | - gradients with respect to the initial condition variables, the dimension and parallel layout of these vectors is the same as the ODE solution vector | |
mu | - gradients with respect to the parameters, the number of entries in these vectors is the same as the number of parameters |
After TSAdjointSolve() is called the lamba and the mu contain the computed sensitivities