Tempus Version of the Day
Time Integration
Loading...
Searching...
No Matches
Tempus::IntegratorAdjointSensitivity< Scalar > Class Template Reference

Time integrator suitable for adjoint sensitivity analysis. More...

#include <Tempus_IntegratorAdjointSensitivity_decl.hpp>

Inheritance diagram for Tempus::IntegratorAdjointSensitivity< Scalar >:
Tempus::Integrator< Scalar >

Public Member Functions

 IntegratorAdjointSensitivity (const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &model, const Teuchos::RCP< IntegratorBasic< Scalar > > &state_integrator, const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &adjoint_model, const Teuchos::RCP< AdjointAuxSensitivityModelEvaluator< Scalar > > &adjoint_aux_model, const Teuchos::RCP< IntegratorBasic< Scalar > > &adjoint_integrator, const Teuchos::RCP< SolutionHistory< Scalar > > &solution_history, const int p_index, const int g_index, const bool g_depends_on_p, const bool f_depends_on_p, const bool ic_depends_on_p, const bool mass_matrix_is_identity, const AdjointResponseType response_type=AdjointResponseType::FinalTime, const std::vector< Scalar > &response_times=std::vector< Scalar >(), const Teuchos::RCP< const DAEStructure< Scalar > > &dae_structure=Teuchos::null, const Teuchos::RCP< const Teuchos::ParameterList > &dae_jump_solver_pl=Teuchos::null)
 Full Constructor with model, and will be fully initialized.
 IntegratorAdjointSensitivity ()
 Constructor that requires a subsequent setParameterList, setStepper, and initialize calls.
virtual ~IntegratorAdjointSensitivity ()
 Destructor.

Overridden from Teuchos::Describable

Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > model_
Teuchos::RCP< IntegratorBasic< Scalar > > state_integrator_
Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > adjoint_model_
Teuchos::RCP< AdjointAuxSensitivityModelEvaluator< Scalar > > adjoint_aux_model_
Teuchos::RCP< IntegratorBasic< Scalar > > adjoint_integrator_
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory_
int p_index_
int g_index_
bool g_depends_on_p_
bool f_depends_on_p_
bool ic_depends_on_p_
bool mass_matrix_is_identity_
AdjointResponseType response_type_
std::vector< Scalar > response_times_
Teuchos::RCP< SolutionHistory< Scalar > > adjoint_solution_history_
Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > dxdp_init_
Teuchos::RCP< Thyra::MultiVectorBase< Scalar > > dgdp_
SensitivityStepMode stepMode_
Teuchos::RCP< const DAEStructure< Scalar > > dae_structure_
 Structure of the index-1 DAE (null for an ODE).
Teuchos::RCP< const AdjointDAEJumpSolver< Scalar > > dae_jump_solver_
 Solver of the adjoint jumps of the index-1 DAE (null for an ODE).
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > dfdp_op_
 df/dp work objects for the algebraic contributions of the jumps
Teuchos::RCP< Thyra::MultiVectorBase< Scalar > > dfdp_mv_
std::string description () const override
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override
SensitivityStepMode getStepMode () const
 What mode the current time integration step is in.
Teuchos::RCP< AdjointAuxSensitivityModelEvaluator< Scalar > > createAdjointModel (const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &model, const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &adjoint_model, const Teuchos::RCP< Teuchos::ParameterList > &inputPL)
void buildSolutionHistory (const Teuchos::RCP< const SolutionHistory< Scalar > > &state_solution_history, const Teuchos::RCP< const SolutionHistory< Scalar > > &adjoint_solution_history)
Teuchos::RCP< Thyra::LinearOpWithSolveBase< Scalar > > createAdjointMassMatrixSolver (const Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs) const
 Solver for df/dx_dot^T, computed with the adjoint model at inArgs.
Teuchos::RCP< const SolutionState< Scalar > > findForwardState (const SolutionHistory< Scalar > &state_solution_history, const Scalar t, const Scalar tol) const
 Forward state at time t, which must be the time of a stored time step.
bool integrateAdjoint (const Scalar tau_begin, const Scalar tau_end, Thyra::VectorBase< Scalar > &adjoint_state, int &index)
void appendAdjointSolutionHistory (const Scalar tol)

Basic integrator methods

virtual bool advanceTime ()
 Advance the solution to timeMax, and return true if successful.
virtual bool advanceTime (const Scalar timeFinal) override
 Advance the solution to timeFinal, and return true if successful.
virtual Scalar getTime () const override
 Get current time.
virtual int getIndex () const override
 Get current index.
virtual Status getStatus () const override
 Get Status.
virtual void setStatus (const Status st) override
 Set Status.
virtual Teuchos::RCP< Stepper< Scalar > > getStepper () const override
 Get the Stepper.
virtual Teuchos::RCP< const SolutionHistory< Scalar > > getSolutionHistory () const override
 Get the SolutionHistory.
Teuchos::RCP< const SolutionHistory< Scalar > > getStateSolutionHistory () const
Teuchos::RCP< const SolutionHistory< Scalar > > getSensSolutionHistory () const
virtual Teuchos::RCP< SolutionHistory< Scalar > > getNonConstSolutionHistory () override
 Get the SolutionHistory.
virtual Teuchos::RCP< const TimeStepControl< Scalar > > getTimeStepControl () const override
 Get the TimeStepControl.
virtual Teuchos::RCP< TimeStepControl< Scalar > > getNonConstTimeStepControl () override
Teuchos::RCP< TimeStepControl< Scalar > > getStateNonConstTimeStepControl ()
Teuchos::RCP< TimeStepControl< Scalar > > getSensNonConstTimeStepControl ()
virtual Teuchos::RCP< Teuchos::Time > getIntegratorTimer () const override
 Returns the IntegratorTimer_ for this Integrator.
virtual Teuchos::RCP< Teuchos::Time > getStepperTimer () const override
virtual void initializeSolutionHistory (Scalar t0, Teuchos::RCP< const Thyra::VectorBase< Scalar > > x0, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdot0=Teuchos::null, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdotdot0=Teuchos::null, Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > DxDp0=Teuchos::null, Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > DxdotDp0=Teuchos::null, Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > DxdotdotDp0=Teuchos::null)
 Set the initial state from Thyra::VectorBase(s).
virtual Teuchos::RCP< IntegratorObserver< Scalar > > getObserver ()
 Get the Observer.
virtual void setObserver (Teuchos::RCP< IntegratorObserver< Scalar > > obs=Teuchos::null)
 Set the Observer.
virtual void initialize ()
 Initializes the Integrator after set* function calls.
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getX () const
 Get the current solution, x.
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getXDot () const
 Get the current time derivative of the solution, xdot.
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getXDotDot () const
 Get the current second time derivative of the solution, xdotdot.
virtual Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > getY () const
 Get the current adjoint solution, y.
virtual Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > getYDot () const
 Get the current time derivative of the adjoint solution, ydot.
virtual Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > getYDotDot () const
 Get the current second time derivative of the adjoint solution, ydotdot.
virtual Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > getDgDp () const
 Return adjoint sensitivity stored in gradient format.
Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > getAdjointModel () const
Teuchos::RCP< const DAEStructure< Scalar > > getDAEStructure () const
 Structure of the index-1 DAE (null for an ODE).

Detailed Description

template<class Scalar>
class Tempus::IntegratorAdjointSensitivity< Scalar >

Time integrator suitable for adjoint sensitivity analysis.

This integrator implements transient adjoint sensitivities. Given a model evaluator encapsulating the equations f(x_dot,x,p) = 0, and a response function g(x,p), these equations are integrated forward in time to some final time T. Then the adjoint equations F(y) = d/dt( df/dx_dot^T*y ) - df/dx^T*y = 0 are integrated backward in time starting at t = T where y is the adjoint variable. Nominally y is a multi-vector belonging to the vector space of f and the number of columns given by the number of entries in the response g. The initial conditions for y at t = T are given by y(T) = df/dx_dot(x_dot(T),x(T),p)^{-T} * dg/dx(x(T),p)^T. Then the final sensitivity of g is dg/dp(T) - int_{0}^T(df/dp^T*y)dt + dx/dp(0)^T*df/dx_dot(0)^T*y(0).

This integrator supports both implicit and explicit steppers, and provides a method to compute dg/dp as described above after the reverse integration. The solution history contains solutions stored as product vectors (x,y), with y further stored as a product vector for each component of g.

Because of limitations on the steppers, the implementation currently assumes df/dxdot is a constant matrix.

Besides the final-time response above, two more responses are supported through the "Response Type" option of the "Sensitivities" sublist:

  • "Time Integral": J = int_{0}^T g(x(t),p,t) dt. The adjoint equations get the source term dg/dx^T, y(T) = 0, and the sensitivity is int_{0}^T(dg/dp^T - df/dp^T*y)dt + dx/dp(0)^T*df/dx_dot(0)^T*y(0).
  • "Sum Over Times": J = sum_k g(x(t_k),p,t_k), with the times t_k given by "Response Time List". Between the times t_k the adjoint equations are homogeneous, and at each t_k the adjoint jumps by df/dx_dot^{-T}*dg/dx(t_k)^T. The sensitivity is sum_k dg/dp(t_k)^T - int_{0}^T(df/dp^T*y)dt
    • dx/dp(0)^T*df/dx_dot(0)^T*y(0). The adjoint integration is restarted at every t_k, so no time step crosses a jump. The forward time steps must end at the times t_k: with "Step Type" = "Variable" the times t_k are added as time events on which the time steps land exactly, with "Step Type" = "Constant" they must be on the time grid.

In both cases the response must not depend on x_dot. If the model supports dg/dx_dot, it is checked to be zero.

Index-1 DAEs. If some equations do not depend on x_dot (algebraic equations, e.g. constraints, or Dirichlet conditions written as f_i = x_i - d_i(p,t)), df/dx_dot is singular and the jumps above are not defined. For an index-1 DAE, the "Algebraic Equations Mask" option gives the algebraic equations, the rows of df/dx_dot that are zero (see DAEStructure). With E = df/dx_dot, A = df/dx, and P_a, P_d the masks of the algebraic and differential equations, the adjoint jump at a response time t_k is then given by the solution z of C^T z = dg/dx(t_k)^T, C = P_a A + P_d E (at the state at t_k):

  • the jump of the adjoint is P_d z (its differential components);
  • the algebraic adjoint unknowns are determined by the adjoint equations, which are a DAE as well, and the algebraic components of z add -df/dp(t_k)^T (P_a z) to the sensitivity.

This accounts for the dependence of the response on the algebraic unknowns x_a: for a semi-explicit DAE, ordering the algebraic equations and unknowns first, C = [A_aa A_ad; 0 E_dd], so P_a z = A_aa^{-T} dg/dx_a^T and P_d z = E_dd^{-T} (dg/dx_d^T - A_ad^T P_a z). C^T z = dg/dx^T is solved with AdjointDAEJumpSolver (options in the "Algebraic Jump Solver" sublist of "Sensitivities"), using only evaluations of the adjoint model: the model must return the true df/dx_dot and df/dx for any alpha and beta. The "Time Integral" response has no jumps and does not need this option. The steppers must be suited to index-1 DAEs (e.g. Backward Euler), and must not compute consistent initial conditions ("Initial Condition Consistency" = "Consistent"), which requires a nonsingular df/dx_dot.

To extract the final solution x(T) and sensitivity dg/dp(T) one should use the getX() and getDgDp() methods, which return these quantities directly. One can also extract this data for all times from the solution history, however the data is stored in Thyra product vectors which requires knowledge of the internal implementation.

Definition at line 107 of file Tempus_IntegratorAdjointSensitivity_decl.hpp.

Constructor & Destructor Documentation

◆ IntegratorAdjointSensitivity() [1/2]

template<class Scalar>
Tempus::IntegratorAdjointSensitivity< Scalar >::IntegratorAdjointSensitivity ( const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > & model,
const Teuchos::RCP< IntegratorBasic< Scalar > > & state_integrator,
const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > & adjoint_model,
const Teuchos::RCP< AdjointAuxSensitivityModelEvaluator< Scalar > > & adjoint_aux_model,
const Teuchos::RCP< IntegratorBasic< Scalar > > & adjoint_integrator,
const Teuchos::RCP< SolutionHistory< Scalar > > & solution_history,
const int p_index,
const int g_index,
const bool g_depends_on_p,
const bool f_depends_on_p,
const bool ic_depends_on_p,
const bool mass_matrix_is_identity,
const AdjointResponseType response_type = AdjointResponseType::FinalTime,
const std::vector< Scalar > & response_times = std::vector<Scalar>(),
const Teuchos::RCP< const DAEStructure< Scalar > > & dae_structure = Teuchos::null,
const Teuchos::RCP< const Teuchos::ParameterList > & dae_jump_solver_pl = Teuchos::null )

Full Constructor with model, and will be fully initialized.

Parameters
[in]modelThe forward physics ModelEvaluator
[in]state_integratorForward state Integrator for the forward problem
[in]adjoint_modelModelEvaluator for the adjoint physics/problem
[in]adjoint_aux_modelModelEvaluator for the auxiliary adjoint physics/problem
[in]adjoint_integratorTime integrator for the adjoint problem
[in]solution_historyThe forward state solution history
[in]p_indexSensitivity parameter index
[in]g_indexResponse function index
[in]g_depends_on_pDoes response depends on parameters?
[in]f_depends_on_pDoes residual depends on parameters?
[in]ic_depends_on_pDoes the initial condition depends on parameters?
adjoint_modelModelEvaluator for the adjoint problem. Optional. Default value is null.
[in]mass_matrix_is_identityIs the mass matrix an identity matrix?

In addition to all of the regular integrator options, the supplied parameter list supports the following options contained within a sublist "Sensitivities" from the top-level parameter list:

  • "Sensitivity Parameter Index", (default: 0) The model evaluator parameter index for which sensitivities will be computed.
  • "Response Function Index", (default: 0) The model evaluator response index for which sensitivities will be computed.
  • "Response Depends on Parameters", (default: true) Whether the response function depends on the parameter vector p for which sensitivities will be computed. If set to false, the dg/dp term in the sensitivity formula will not be computed.
  • "Residual Depends on Parameters", (default: true) Whether the model residual f depends on the parameter vector p for which sensitivities will be computed. If set to false, its contribution to the sensitivities will not be computed.
  • "IC Depends on Parameters", (default: true) Whether the initial conditions depend on the parameter vector p for which sensitivities will be computed. If set to false, its contribution to the sensitivities will not be computed.
  • "Mass Matrix Is Constant" (default: true) Whether the mass matrix df/dx_dot is a constant matrix. As describe above, this is currently required to be true.
  • "Mass Matrix Is Identity" (default: false) Whether the mass matrix is the identity matrix, in which some computations can be skipped.
  • "Response Type" (default: "Final Time") "Final Time" for g(x(T),p), "Time Integral" for int_{0}^T g(x(t),p,t) dt, or "Sum Over Times" for sum_k g(x(t_k),p,t_k).
  • "Response Time List" (default: "") Comma-separated list of the times t_k of the "Sum Over Times" response.
  • "Algebraic Equations Mask" (default: null) A Teuchos::RCP<const Thyra::VectorBase<Scalar> > in the residual space, equal to 1 on the algebraic equations of an index-1 DAE and 0 elsewhere (see the class description and DAEStructure).
  • "Algebraic Jump Solver" (sublist) Options of the solver of the adjoint jumps of an index-1 DAE (see AdjointDAEJumpSolver).

To support use-cases with explicitly computed adjoint operators, the constructor takes an additional model evaluator for computing the adjoint W/W_op. It is assumed the operator returned by this model evaluator is the adjoint, and so will not be transposed. It is also assumed this model evaluator accepts the same inArgs as the forward model, however it only requires supporting the adjoint W/W_op outArgs.

Version of the constructor taking a single model evaluator.

This version takes a single model evaluator for the case when the adjoint is implicitly determined from the forward operator by the (conjugate) transpose.

Definition at line 31 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ IntegratorAdjointSensitivity() [2/2]

template<class Scalar>
Tempus::IntegratorAdjointSensitivity< Scalar >::IntegratorAdjointSensitivity ( )

Constructor that requires a subsequent setParameterList, setStepper, and initialize calls.

Definition at line 88 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ ~IntegratorAdjointSensitivity()

template<class Scalar>
virtual Tempus::IntegratorAdjointSensitivity< Scalar >::~IntegratorAdjointSensitivity ( )
inlinevirtual

Destructor.

Definition at line 202 of file Tempus_IntegratorAdjointSensitivity_decl.hpp.

Member Function Documentation

◆ advanceTime() [1/2]

template<class Scalar>
bool Tempus::IntegratorAdjointSensitivity< Scalar >::advanceTime ( )
virtual

Advance the solution to timeMax, and return true if successful.

Definition at line 97 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ advanceTime() [2/2]

template<class Scalar>
bool Tempus::IntegratorAdjointSensitivity< Scalar >::advanceTime ( const Scalar timeFinal)
overridevirtual

Advance the solution to timeFinal, and return true if successful.

Implements Tempus::Integrator< Scalar >.

Definition at line 104 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ getTime()

template<class Scalar>
Scalar Tempus::IntegratorAdjointSensitivity< Scalar >::getTime ( ) const
overridevirtual

Get current time.

Implements Tempus::Integrator< Scalar >.

Definition at line 449 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ getIndex()

template<class Scalar>
int Tempus::IntegratorAdjointSensitivity< Scalar >::getIndex ( ) const
overridevirtual

Get current index.

Implements Tempus::Integrator< Scalar >.

Definition at line 458 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ getStatus()

template<class Scalar>
Status Tempus::IntegratorAdjointSensitivity< Scalar >::getStatus ( ) const
overridevirtual

◆ setStatus()

template<class Scalar>
void Tempus::IntegratorAdjointSensitivity< Scalar >::setStatus ( const Status st)
overridevirtual

◆ getStepper()

template<class Scalar>
Teuchos::RCP< Stepper< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getStepper ( ) const
overridevirtual

◆ getSolutionHistory()

template<class Scalar>
Teuchos::RCP< const SolutionHistory< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getSolutionHistory ( ) const
overridevirtual

◆ getStateSolutionHistory()

template<class Scalar>
Teuchos::RCP< const SolutionHistory< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getStateSolutionHistory ( ) const

◆ getSensSolutionHistory()

template<class Scalar>
Teuchos::RCP< const SolutionHistory< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getSensSolutionHistory ( ) const

◆ getNonConstSolutionHistory()

template<class Scalar>
Teuchos::RCP< SolutionHistory< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getNonConstSolutionHistory ( )
overridevirtual

◆ getTimeStepControl()

template<class Scalar>
Teuchos::RCP< const TimeStepControl< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getTimeStepControl ( ) const
overridevirtual

◆ getNonConstTimeStepControl()

template<class Scalar>
Teuchos::RCP< TimeStepControl< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getNonConstTimeStepControl ( )
overridevirtual

◆ getStateNonConstTimeStepControl()

template<class Scalar>
Teuchos::RCP< TimeStepControl< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getStateNonConstTimeStepControl ( )

◆ getSensNonConstTimeStepControl()

template<class Scalar>
Teuchos::RCP< TimeStepControl< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getSensNonConstTimeStepControl ( )

◆ getIntegratorTimer()

template<class Scalar>
virtual Teuchos::RCP< Teuchos::Time > Tempus::IntegratorAdjointSensitivity< Scalar >::getIntegratorTimer ( ) const
inlineoverridevirtual

Returns the IntegratorTimer_ for this Integrator.

Implements Tempus::Integrator< Scalar >.

Definition at line 237 of file Tempus_IntegratorAdjointSensitivity_decl.hpp.

◆ getStepperTimer()

template<class Scalar>
virtual Teuchos::RCP< Teuchos::Time > Tempus::IntegratorAdjointSensitivity< Scalar >::getStepperTimer ( ) const
inlineoverridevirtual

◆ initializeSolutionHistory()

template<class Scalar>
void Tempus::IntegratorAdjointSensitivity< Scalar >::initializeSolutionHistory ( Scalar t0,
Teuchos::RCP< const Thyra::VectorBase< Scalar > > x0,
Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdot0 = Teuchos::null,
Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdotdot0 = Teuchos::null,
Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > DxDp0 = Teuchos::null,
Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > DxdotDp0 = Teuchos::null,
Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > DxdotdotDp0 = Teuchos::null )
virtual

Set the initial state from Thyra::VectorBase(s).

Definition at line 551 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ getObserver()

template<class Scalar>
Teuchos::RCP< IntegratorObserver< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getObserver ( )
virtual

Get the Observer.

Definition at line 565 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ setObserver()

template<class Scalar>
void Tempus::IntegratorAdjointSensitivity< Scalar >::setObserver ( Teuchos::RCP< IntegratorObserver< Scalar > > obs = Teuchos::null)
virtual

Set the Observer.

Definition at line 571 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ initialize()

template<class Scalar>
void Tempus::IntegratorAdjointSensitivity< Scalar >::initialize ( )
virtual

Initializes the Integrator after set* function calls.

Definition at line 581 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ getX()

template<class Scalar>
Teuchos::RCP< const Thyra::VectorBase< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getX ( ) const
virtual

Get the current solution, x.

Definition at line 589 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ getXDot()

template<class Scalar>
Teuchos::RCP< const Thyra::VectorBase< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getXDot ( ) const
virtual

Get the current time derivative of the solution, xdot.

Definition at line 596 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ getXDotDot()

template<class Scalar>
Teuchos::RCP< const Thyra::VectorBase< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getXDotDot ( ) const
virtual

Get the current second time derivative of the solution, xdotdot.

Definition at line 603 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ getY()

template<class Scalar>
Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getY ( ) const
virtual

Get the current adjoint solution, y.

Definition at line 610 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ getYDot()

template<class Scalar>
Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getYDot ( ) const
virtual

Get the current time derivative of the adjoint solution, ydot.

Definition at line 623 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ getYDotDot()

template<class Scalar>
Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getYDotDot ( ) const
virtual

Get the current second time derivative of the adjoint solution, ydotdot.

Definition at line 637 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ getDgDp()

template<class Scalar>
Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getDgDp ( ) const
virtual

Return adjoint sensitivity stored in gradient format.

Definition at line 651 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ getAdjointModel()

template<class Scalar>
Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getAdjointModel ( ) const
inline

◆ getDAEStructure()

template<class Scalar>
Teuchos::RCP< const DAEStructure< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::getDAEStructure ( ) const
inline

Structure of the index-1 DAE (null for an ODE).

Definition at line 290 of file Tempus_IntegratorAdjointSensitivity_decl.hpp.

◆ description()

template<class Scalar>
std::string Tempus::IntegratorAdjointSensitivity< Scalar >::description ( ) const
override

◆ describe()

template<class Scalar>
void Tempus::IntegratorAdjointSensitivity< Scalar >::describe ( Teuchos::FancyOStream & out,
const Teuchos::EVerbosityLevel verbLevel ) const
override

◆ getStepMode()

template<class Scalar>
SensitivityStepMode Tempus::IntegratorAdjointSensitivity< Scalar >::getStepMode ( ) const

What mode the current time integration step is in.

Definition at line 677 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ createAdjointModel()

template<class Scalar>
Teuchos::RCP< AdjointAuxSensitivityModelEvaluator< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::createAdjointModel ( const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > & model,
const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > & adjoint_model,
const Teuchos::RCP< Teuchos::ParameterList > & inputPL )
protected

◆ buildSolutionHistory()

template<class Scalar>
void Tempus::IntegratorAdjointSensitivity< Scalar >::buildSolutionHistory ( const Teuchos::RCP< const SolutionHistory< Scalar > > & state_solution_history,
const Teuchos::RCP< const SolutionHistory< Scalar > > & adjoint_solution_history )
protected

◆ createAdjointMassMatrixSolver()

template<class Scalar>
Teuchos::RCP< Thyra::LinearOpWithSolveBase< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::createAdjointMassMatrixSolver ( const Thyra::ModelEvaluatorBase::InArgs< Scalar > & inArgs) const
protected

Solver for df/dx_dot^T, computed with the adjoint model at inArgs.

Definition at line 376 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ findForwardState()

template<class Scalar>
Teuchos::RCP< const SolutionState< Scalar > > Tempus::IntegratorAdjointSensitivity< Scalar >::findForwardState ( const SolutionHistory< Scalar > & state_solution_history,
const Scalar t,
const Scalar tol ) const
protected

Forward state at time t, which must be the time of a stored time step.

Definition at line 385 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ integrateAdjoint()

template<class Scalar>
bool Tempus::IntegratorAdjointSensitivity< Scalar >::integrateAdjoint ( const Scalar tau_begin,
const Scalar tau_end,
Thyra::VectorBase< Scalar > & adjoint_state,
int & index )
protected

Integrate the adjoint problem from tau_begin to tau_end, starting from adjoint_state, which is overwritten with the adjoint state at tau_end. index is the time step index at tau_begin (negative for the initial index of the time step control), and it is overwritten with the index at tau_end.

Definition at line 410 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

◆ appendAdjointSolutionHistory()

template<class Scalar>
void Tempus::IntegratorAdjointSensitivity< Scalar >::appendAdjointSolutionHistory ( const Scalar tol)
protected

Append the states of the adjoint integrator to adjoint_solution_history_ (used when the adjoint integration is restarted at response times).

Definition at line 429 of file Tempus_IntegratorAdjointSensitivity_impl.hpp.

Member Data Documentation

◆ model_

template<class Scalar>
Teuchos::RCP<Thyra::ModelEvaluator<Scalar> > Tempus::IntegratorAdjointSensitivity< Scalar >::model_
protected

◆ state_integrator_

template<class Scalar>
Teuchos::RCP<IntegratorBasic<Scalar> > Tempus::IntegratorAdjointSensitivity< Scalar >::state_integrator_
protected

◆ adjoint_model_

template<class Scalar>
Teuchos::RCP<Thyra::ModelEvaluator<Scalar> > Tempus::IntegratorAdjointSensitivity< Scalar >::adjoint_model_
protected

◆ adjoint_aux_model_

template<class Scalar>
Teuchos::RCP<AdjointAuxSensitivityModelEvaluator<Scalar> > Tempus::IntegratorAdjointSensitivity< Scalar >::adjoint_aux_model_
protected

◆ adjoint_integrator_

template<class Scalar>
Teuchos::RCP<IntegratorBasic<Scalar> > Tempus::IntegratorAdjointSensitivity< Scalar >::adjoint_integrator_
protected

◆ solutionHistory_

template<class Scalar>
Teuchos::RCP<SolutionHistory<Scalar> > Tempus::IntegratorAdjointSensitivity< Scalar >::solutionHistory_
protected

◆ p_index_

template<class Scalar>
int Tempus::IntegratorAdjointSensitivity< Scalar >::p_index_
protected

◆ g_index_

template<class Scalar>
int Tempus::IntegratorAdjointSensitivity< Scalar >::g_index_
protected

◆ g_depends_on_p_

template<class Scalar>
bool Tempus::IntegratorAdjointSensitivity< Scalar >::g_depends_on_p_
protected

◆ f_depends_on_p_

template<class Scalar>
bool Tempus::IntegratorAdjointSensitivity< Scalar >::f_depends_on_p_
protected

◆ ic_depends_on_p_

template<class Scalar>
bool Tempus::IntegratorAdjointSensitivity< Scalar >::ic_depends_on_p_
protected

◆ mass_matrix_is_identity_

template<class Scalar>
bool Tempus::IntegratorAdjointSensitivity< Scalar >::mass_matrix_is_identity_
protected

◆ response_type_

template<class Scalar>
AdjointResponseType Tempus::IntegratorAdjointSensitivity< Scalar >::response_type_
protected

◆ response_times_

template<class Scalar>
std::vector<Scalar> Tempus::IntegratorAdjointSensitivity< Scalar >::response_times_
protected

◆ adjoint_solution_history_

template<class Scalar>
Teuchos::RCP<SolutionHistory<Scalar> > Tempus::IntegratorAdjointSensitivity< Scalar >::adjoint_solution_history_
protected

Adjoint solution history combining the segments of the adjoint integration for the "Sum Over Times" response (null otherwise)

Definition at line 355 of file Tempus_IntegratorAdjointSensitivity_decl.hpp.

◆ dxdp_init_

template<class Scalar>
Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> > Tempus::IntegratorAdjointSensitivity< Scalar >::dxdp_init_
protected

◆ dgdp_

template<class Scalar>
Teuchos::RCP<Thyra::MultiVectorBase<Scalar> > Tempus::IntegratorAdjointSensitivity< Scalar >::dgdp_
protected

◆ stepMode_

template<class Scalar>
SensitivityStepMode Tempus::IntegratorAdjointSensitivity< Scalar >::stepMode_
protected

◆ dae_structure_

template<class Scalar>
Teuchos::RCP<const DAEStructure<Scalar> > Tempus::IntegratorAdjointSensitivity< Scalar >::dae_structure_
protected

Structure of the index-1 DAE (null for an ODE).

Definition at line 360 of file Tempus_IntegratorAdjointSensitivity_decl.hpp.

◆ dae_jump_solver_

template<class Scalar>
Teuchos::RCP<const AdjointDAEJumpSolver<Scalar> > Tempus::IntegratorAdjointSensitivity< Scalar >::dae_jump_solver_
protected

Solver of the adjoint jumps of the index-1 DAE (null for an ODE).

Definition at line 362 of file Tempus_IntegratorAdjointSensitivity_decl.hpp.

◆ dfdp_op_

template<class Scalar>
Teuchos::RCP<Thyra::LinearOpBase<Scalar> > Tempus::IntegratorAdjointSensitivity< Scalar >::dfdp_op_
protected

df/dp work objects for the algebraic contributions of the jumps

Definition at line 364 of file Tempus_IntegratorAdjointSensitivity_decl.hpp.

◆ dfdp_mv_

template<class Scalar>
Teuchos::RCP<Thyra::MultiVectorBase<Scalar> > Tempus::IntegratorAdjointSensitivity< Scalar >::dfdp_mv_
protected

The documentation for this class was generated from the following files: