Piro Development
Loading...
Searching...
No Matches
Piro::TempusResponseAccumulator< Real > Class Template Reference

Tempus observer that computes a "Time Integral" or "Sum Over Times" response during the forward time integration. More...

#include <Piro_ThyraProductME_Tempus_FinalObjective.hpp>

Inheritance diagram for Piro::TempusResponseAccumulator< Real >:
Collaboration diagram for Piro::TempusResponseAccumulator< Real >:

Public Member Functions

 TempusResponseAccumulator (const Teuchos::RCP< const Thyra::ModelEvaluator< Real > > &model, const int g_index, const Thyra::ModelEvaluatorBase::InArgs< Real > &inArgs, const Tempus::AdjointResponseType responseType, const std::vector< Real > &responseTimes, const Real timeTol)
void observeStartIntegrator (const Tempus::Integrator< Real > &integrator) override
void observeEndTimeStep (const Tempus::Integrator< Real > &integrator) override
Real getValue () const
std::vector< Real > getMissedTimes () const

Detailed Description

template<typename Real>
class Piro::TempusResponseAccumulator< Real >

Tempus observer that computes a "Time Integral" or "Sum Over Times" response during the forward time integration.

  • "Time Integral": J = int_{t0}^{T} g(x(t),p,t) dt, computed with the trapezoidal rule over the accepted time steps.
  • "Sum Over Times": J = sum_k g(x(t_k),p,t_k), where the time steps must end at the times t_k (up to the tolerance). The model is evaluated exactly at the times t_k.

Member Function Documentation

◆ getMissedTimes()

template<typename Real>
std::vector< Real > Piro::TempusResponseAccumulator< Real >::getMissedTimes ( ) const
inline

Response times that are not the time of a time step, including those that have not been reached

◆ getValue()

template<typename Real>
Real Piro::TempusResponseAccumulator< Real >::getValue ( ) const
inline

Value of the response computed by the last time integration. If the time integration failed, this is the partial value up to the last accepted time step: ThyraProductME_TempusFinalObjective reports the failure ("State Solve Converged" = false), and the value is then replaced by the "Objective Recovery Value" (or value() throws).


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