ROL
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
ROL::DynamicFunction< Real > Class Template Reference

Provides update interface, casting and vector management to DynamicConstraint and DynamicObjective. More...

#include <ROL_DynamicFunction.hpp>

+ Inheritance diagram for ROL::DynamicFunction< Real >:

Public Types

using V = Vector< Real >
 
using PV = PartitionedVector< Real >
 
using TS = TimeStamp< Real >
 

Public Member Functions

 DynamicFunction (std::initializer_list< std::string > zero_deriv_terms={})
 
virtual ~DynamicFunction ()
 
virtual void update_uo (const V &x, const TS &ts)
 
virtual void update_un (const V &x, const TS &ts)
 
virtual void update_z (const V &x, const TS &ts)
 
bool is_zero_derivative (const std::string &key)
 

Protected Member Functions

VectorWorkspace< Real > & getVectorWorkspace () const
 
PVpartition (V &x) const
 
const PVpartition (const V &x) const
 
VgetNew (V &x) const
 
const VgetNew (const V &x) const
 
VgetOld (V &x) const
 
const VgetOld (const V &x) const
 

Private Member Functions

template<typename First >
void add_terms (const First &first)
 
template<typename First , typename... Rest>
void add_terms (const First &first, const Rest &...rest)
 

Private Attributes

VectorWorkspace< Real > workspace_
 
std::vector< std::string > zero_deriv_terms_
 

Detailed Description

template<typename Real>
class ROL::DynamicFunction< Real >

Provides update interface, casting and vector management to DynamicConstraint and DynamicObjective.

Allowed strings to indicate terms with zero derivatives: {"uo","un","z","uo_uo","uo_un","uo_z","un_uo","un_un","un_z","z_uo","z_un", "z_z"} Note that is "X_Y" is specified, "Y_X" will be added automatically.

Definition at line 68 of file ROL_DynamicFunction.hpp.

Member Typedef Documentation

template<typename Real >
using ROL::DynamicFunction< Real >::V = Vector<Real>

Definition at line 71 of file ROL_DynamicFunction.hpp.

template<typename Real >
using ROL::DynamicFunction< Real >::PV = PartitionedVector<Real>

Definition at line 72 of file ROL_DynamicFunction.hpp.

template<typename Real >
using ROL::DynamicFunction< Real >::TS = TimeStamp<Real>

Definition at line 73 of file ROL_DynamicFunction.hpp.

Constructor & Destructor Documentation

template<typename Real >
ROL::DynamicFunction< Real >::DynamicFunction ( std::initializer_list< std::string >  zero_deriv_terms = {})
inline

Definition at line 75 of file ROL_DynamicFunction.hpp.

template<typename Real >
virtual ROL::DynamicFunction< Real >::~DynamicFunction ( )
inlinevirtual

Definition at line 90 of file ROL_DynamicFunction.hpp.

Member Function Documentation

template<typename Real >
virtual void ROL::DynamicFunction< Real >::update_uo ( const V x,
const TS ts 
)
inlinevirtual
template<typename Real >
virtual void ROL::DynamicFunction< Real >::update_un ( const V x,
const TS ts 
)
inlinevirtual
template<typename Real >
virtual void ROL::DynamicFunction< Real >::update_z ( const V x,
const TS ts 
)
inlinevirtual
template<typename Real >
bool ROL::DynamicFunction< Real >::is_zero_derivative ( const std::string &  key)
inline
template<typename Real >
VectorWorkspace< Real > & ROL::DynamicFunction< Real >::getVectorWorkspace ( ) const
protected

Definition at line 54 of file ROL_DynamicFunctionDef.hpp.

References workspace_.

template<typename Real >
PartitionedVector< Real > & ROL::DynamicFunction< Real >::partition ( V x) const
protected

Definition at line 58 of file ROL_DynamicFunctionDef.hpp.

template<typename Real >
const PartitionedVector< Real > & ROL::DynamicFunction< Real >::partition ( const V x) const
protected

Definition at line 64 of file ROL_DynamicFunctionDef.hpp.

template<typename Real >
Vector< Real > & ROL::DynamicFunction< Real >::getNew ( V x) const
protected

Definition at line 70 of file ROL_DynamicFunctionDef.hpp.

References ROL::partition().

template<typename Real >
const Vector< Real > & ROL::DynamicFunction< Real >::getNew ( const V x) const
protected

Definition at line 76 of file ROL_DynamicFunctionDef.hpp.

References ROL::partition().

template<typename Real >
Vector< Real > & ROL::DynamicFunction< Real >::getOld ( V x) const
protected

Definition at line 82 of file ROL_DynamicFunctionDef.hpp.

References ROL::partition().

template<typename Real >
const Vector< Real > & ROL::DynamicFunction< Real >::getOld ( const V x) const
protected

Definition at line 88 of file ROL_DynamicFunctionDef.hpp.

References ROL::partition().

template<typename Real >
template<typename First >
void ROL::DynamicFunction< Real >::add_terms ( const First &  first)
inlineprivate
template<typename Real >
template<typename First , typename... Rest>
void ROL::DynamicFunction< Real >::add_terms ( const First &  first,
const Rest &...  rest 
)
inlineprivate

Member Data Documentation

template<typename Real >
VectorWorkspace<Real> ROL::DynamicFunction< Real >::workspace_
mutableprivate

Definition at line 123 of file ROL_DynamicFunction.hpp.

template<typename Real >
std::vector<std::string> ROL::DynamicFunction< Real >::zero_deriv_terms_
private

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