Piro  Development
 All Classes Namespaces Functions Variables Groups
Public Member Functions | List of all members
Piro::ThyraProductME_ROL_DynamicObjective< Real > Class Template Reference

ThyraProductME_ROL_DynamicObjective. More...

#include <Piro_ThyraProductME_ROL_DynamicObjective.hpp>

Inheritance diagram for Piro::ThyraProductME_ROL_DynamicObjective< Real >:
Inheritance graph
[legend]
Collaboration diagram for Piro::ThyraProductME_ROL_DynamicObjective< Real >:
Collaboration graph
[legend]

Public Member Functions

 ThyraProductME_ROL_DynamicObjective (const Teuchos::RCP< Thyra::ModelEvaluator< Real >> &model, const Teuchos::RCP< Tempus::Integrator< Real > > &integrator, const Teuchos::RCP< Tempus::Integrator< Real >> &adjoint_integrator, const Teuchos::RCP< Thyra::ModelEvaluator< Real >> &modelAdjoin, int g_index, Teuchos::ParameterList &piroParams, const int Nt, const bool onlyFinalTime=true, const bool useTrapezoidalTimeIntegration=true, Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_HIGH, Teuchos::RCP< ROL_ObserverBase< Real >> observer=Teuchos::null)
 
Real value (const ROL::Vector< Real > &u_old, const ROL::Vector< Real > &u_new, const ROL::Vector< Real > &z, const ROL::TimeStamp< Real > &timeStamp) const
 Compute value of objective.
 
void gradient_uo (ROL::Vector< Real > &g, const ROL::Vector< Real > &u_old, const ROL::Vector< Real > &u_new, const ROL::Vector< Real > &z, const ROL::TimeStamp< Real > &timeStamp) const
 
void gradient_un (ROL::Vector< Real > &g, const ROL::Vector< Real > &u_old, const ROL::Vector< Real > &u_new, const ROL::Vector< Real > &z, const ROL::TimeStamp< Real > &timeStamp) const
 
void gradient_z (ROL::Vector< Real > &g, const ROL::Vector< Real > &u_old, const ROL::Vector< Real > &u_new, const ROL::Vector< Real > &z, const ROL::TimeStamp< Real > &timeStamp) const
 
Real value (const Teuchos::RCP< const Thyra::VectorBase< Real >> &x, const Teuchos::RCP< const Thyra::VectorBase< Real >> &x_dot, const Teuchos::RCP< const Thyra::VectorBase< Real >> &p, const Real &t) const
 
void gradient_uo (Teuchos::RCP< Thyra::VectorBase< Real >> &g, const Teuchos::RCP< const Thyra::VectorBase< Real >> &x, const Teuchos::RCP< const Thyra::VectorBase< Real >> &x_dot, const Teuchos::RCP< const Thyra::VectorBase< Real >> &p, const Real &t, const bool u_new, const Real &dt) const
 
void gradient_un (Teuchos::RCP< Thyra::VectorBase< Real >> &g, const Teuchos::RCP< const Thyra::VectorBase< Real >> &x, const Teuchos::RCP< const Thyra::VectorBase< Real >> &x_dot, const Teuchos::RCP< const Thyra::VectorBase< Real >> &p, const Real &t, const bool u_new, const Real &dt) const
 
void gradient_z (Teuchos::RCP< Thyra::VectorBase< Real >> &g, const Teuchos::RCP< const Thyra::VectorBase< Real >> &x, const Teuchos::RCP< const Thyra::VectorBase< Real >> &x_dot, const Teuchos::RCP< const Thyra::VectorBase< Real >> &p, const Real &t) const
 
void update (const ROL::Vector< Real > &x, ROL::UpdateType type, int iter=-1)
 
void update_uo (const ROL::Vector< Real > &x, const ROL::TimeStamp< Real > &ts)
 
void update_un (const ROL::Vector< Real > &x, const ROL::TimeStamp< Real > &ts)
 
void update_z (const ROL::Vector< Real > &x, const ROL::TimeStamp< Real > &ts)
 

Detailed Description

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

ThyraProductME_ROL_DynamicObjective.

This class is used to be able to call Tempus from ROL in the context of time integrated responses.

ROL needs to compute derivative with respect to u_old, u_new, and z. However, Tempus allows to compute derivative with respect to x, x_dot, and p.

In this class member functions, we used the approximation:

\[ \dot{x} = \frac{u_{new}-u_{old}}{dt} \]

to evaluate the response value (if it depends on x_dot) and the derivatives.

The time integration over a ROL time stamp is done here using a trapezoidal approach if the response does not depend only on the final time step.

The implemented trapezoidal approach visits both the first and the last time steps of the ROL time stamp and evaluates the time integrand for both of these time values. For the first one, x is set to u_old, x_dot is computed as above, and the time t of the first time step of the time stamp is used. For the last one, x is set to u_new, x_dot is computed as above, and the time t of the last time step of the time stamp is used.


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