Skip to content

Tempus: Implement transient adjoint sensitivity analysis

James Willenbring requested to merge tempus_asa into develop

Created by: etphipp

@trilinos/tempus @trilinos/thyra

Code was tested with a standard SEMS build with the checkin test script, so is safe for merging.

This PR adds transient adjoint sensitivity analysis capabilities to Tempus. Similar to forward sensitivity analysis, it is implemented by a special integrator IntergratorAdjointSensitivity. There are restrictions on the implementation though:

  • Steppers using x_dot_dot are not supported
  • Only sensitivities of a point-response evaluation at the final time are supported
  • The model must have a mass matrix (df/dx_dot) that is constant with respect to x, x_dot, and t.
  • IMEX steppers are not supported (as with forward sensitivities)
  • No checkpointing is implemented and the full forward transient history must be saved in the solution history.

The implementation required implementing interpolation capabilities for the solution history. I put in support for that along with an arbitrary-order Lagrange interpolation method. I also added interpolation to the staggered forward sensitivity method allowing it to work with DIRK and explicit RK steppers.

Tests for adjoint sensitivities were added for ExplicitRK, Backward Euler, BDF2, and DIRK steppers.

Included in this PR are some classes that aren't currently being used. They were used in an intermediate version of the implementation and they still may prove to be useful in the future, so I am keeping them.

This also required a change to a Thyra block linear op with solve class needed to handle solver criteria and setting the solver status.

Merge request reports