Skip to main content
`Ctrl`+`K`

# TSAdjointSetFromOptions

Sets various `TS` adjoint parameters from options database.

## Synopsis

    #include <petscts.h>
    PetscErrorCode TSAdjointSetFromOptions(TS ts, PetscOptionItems *PetscOptionsObject)

Collective

## Input Parameters

- ts - the `TS` context

- PetscOptionsObject - the options context

## Options Database Keys

- -ts_adjoint_solve <yes,no> - After solving the ODE/DAE solve the adjoint problem (requires `-ts_save_trajectory`)

- -ts_adjoint_monitor - print information at each adjoint time step

- -ts_adjoint_monitor_draw_sensi - monitor the sensitivity of the first cost function wrt initial conditions (lambda[0]) graphically

## Note

This is not normally called directly by users

## See Also

TS: Scalable ODE and DAE Solvers, `TSSetSaveTrajectory()`, `TSTrajectorySetUp()`

## Level

developer

## Location

src/ts/interface/sensitivity/tssen.c

Index of all Sensitivity routines
Table of Contents for all manual pages
Index of all manual pages