#include "petscts.h" PetscErrorCode TSGetCostGradients(TS ts,PetscInt *numcost,Vec **lambda,Vec **mu)Not Collective, but Vec returned is parallel if TS is parallel
ts | - the TS context obtained from TSCreate() |
lambda | - vectors containing the gradients of the cost functions with respect to the ODE/DAE solution variables | |
mu | - vectors containing the gradients of the cost functions with respect to the problem parameters |