petsc-3.14.6 2021-03-30
Report Typos and Errors

Sensitivity analysis for ODE and DAE: Examples

The TS library provides discrete adjoint models (TSAdjoint) and tangent linear models (TSForward) for sensitivity analysis for ODEs and DAEs. The adjoint solvers support gradient calculation for multiple cost functions, and the tangent linear solvers support gradient calculation with respect to multiple parameters. Adjoint is particularly efficient when the number of cost functions is much less than the number of parameters. Note that the parameters can be initial states or system parameters as used in the calculation of ODE/DAE right-hand sides. Typical cost functions of interest may depend on the final solution to the ODE/DAE or on the whole trajectory (taking an integral form). The integral can be evaluated together with the time integration.

Beginner - Basic usage
TSAdjointReset TSSetCostGradients
TSForwardSetSensitivities TSSetCostHessianProducts
Intermediate - Setting options for algorithms and data structures
TSAdjointMonitorCancel TSAdjointSolve TSGetQuadratureTS
TSAdjointMonitorDefault TSAdjointStep TSGetRHSJacobianP
TSAdjointMonitorDrawSensi TSCreateQuadratureTS TSSetIHessianProduct
TSAdjointMonitorSensi TSForwardGetSensitivities TSSetIJacobianP
TSAdjointMonitorSet TSForwardSetInitialSensitivities TSSetRHSHessianProduct
TSAdjointResetForward TSGetCostGradients TSSetRHSJacobianP
TSAdjointSetForward TSGetCostHessianProducts
TSAdjointSetSteps TSGetCostIntegral
Advanced - Setting more advanced options and customization
TSAdjointCostIntegral TSForwardGetStages TSForwardStep
TSAdjointSetUp TSForwardReset
TSForwardCostIntegral TSForwardSetUp
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
TSAdjointMonitor TSComputeIHessianProductFunctionUU TSComputeRHSHessianProductFunctionUU
TSAdjointMonitorSetFromOptions TSComputeIJacobianP TSComputeRHSJacobianP
TSComputeIHessianProductFunctionPP TSComputeRHSHessianProductFunctionPP TSComputeSNESJacobian
TSComputeIHessianProductFunctionPU TSComputeRHSHessianProductFunctionPU
TSComputeIHessianProductFunctionUP TSComputeRHSHessianProductFunctionUP
Deprecated - Functionality scheduled for removal in future versions
TSAdjointComputeDRDPFunction TSComputeCostIntegrand TSForwardSetIntegralGradients
TSAdjointComputeDRDYFunction TSComputeDRDPFunction TSSetCostIntegrand
TSAdjointComputeRHSJacobian TSComputeDRDUFunction
TSAdjointSetRHSJacobian TSForwardGetIntegralGradients

Table of Contents