petsc-3.8.4 2018-03-24
Report Typos and Errors

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,Vec *sp,PetscInt num,Vec *s)
Logically Collective on TS and Vec

Input Parameters

ts - the TS context obtained from TSCreate()
nump - number of parameters
sp - sensitivities with respect to the parameters, the number of entries in these vectors is the same as the number of parameters
num - number of initial values
s - sensitivities with respect to the (selected) initial condition variables, the dimension and parallel layout of these vectors is the same as the ODE solution vector

Notes

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 these vectors must be correctly initialized with the values s_i = dy/dp|startingtime. The two user-provided sensitivity vector arrays will be packed into one big array to simplify implementation.

Keywords

TS, timestep, set, forward sensitivity, initial values

See Also

TSForwardGetSensitivities(), TSForwardSetIntegralGradients(), TSForwardGetIntegralGradients(), TSForwardStep()

Level:beginner
Location:
src/ts/interface/tsfwdsen.c
Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages