ROL
ROL::ROL::VectorController< Real, Key > Class Template Reference

#include <ROL_Constraint_SerialSimOpt.hpp>

Inheritance diagram for ROL::ROL::VectorController< Real, Key >:

Public Member Functions

 VectorController (void)
 Constructor.
void reset (bool flag=true)
void objectiveUpdate (bool flag=true)
 Objective function update for VectorController storage.
void constraintUpdate (bool flag=true)
 Equality constraint update for VectorController storage.
void objectiveUpdate (UpdateType type)
 Objective function update for VectorController storage.
void constraintUpdate (UpdateType type)
 Constraint update for VectorController storage.
bool isNull (const Key &param) const
 Check if vector associated with provided key is allocated.
bool isComputed (const Key &param) const
 Check if vector has been computed.
void allocate (const Vector< Real > &x, const Key &param)
 Allocate the vector associated with provided key.
const Ptr< Vector< Real > > set (const Key &param)
 Set the vector associated with provided key. This assumes the vector data will be changed.
const Ptr< const Vector< Real > > get (const Key &param) const
 Return the vector associated with provided key.
bool get (Vector< Real > &x, const Key &param)
 Return vector corresponding to input parameter.
void set (const Vector< Real > &x, const Key &param)
 Set vector corresponding to input parameter.
void push (VectorController< Real, Key > &to) const
 Push the contents of *this into another VectorController.

Private Member Functions

void resetTrial (void)
void resetTemp (void)
bool isNull (const Key &param, const std::map< Key, int > &indices) const
bool isComputed (const Key &param, const std::map< Key, int > &indices, const std::vector< bool > &flags) const
void allocate (const Vector< Real > &x, const Key &param, std::map< Key, int > &indices, std::vector< bool > &flags, std::vector< Ptr< Vector< Real > > > &vectors, int &maxIndex) const
const Ptr< const Vector< Real > > get (const Key &param, const std::map< Key, int > &indices, const std::vector< bool > &flags, const std::vector< Ptr< Vector< Real > > > &vectors, const int &maxIndex) const
const Ptr< Vector< Real > > set (const Key &param, std::map< Key, int > &indices, std::vector< bool > &flags, std::vector< Ptr< Vector< Real > > > &vectors, int &maxIndex) const
bool get (Vector< Real > &x, const Key &param, std::map< Key, int > &indices, std::vector< bool > &flags, std::vector< Ptr< Vector< Real > > > &vectors, int &maxIndex) const
void set (const Vector< Real > &x, const Key &param, std::map< Key, int > &indices, std::vector< bool > &flags, std::vector< Ptr< Vector< Real > > > &vectors, int &maxIndex) const
void accept (void)

Private Attributes

std::map< Key, int > indices_
std::map< Key, int > indices_trial_
std::map< Key, int > indices_temp_
std::vector< bool > flags_
std::vector< bool > flags_trial_
std::vector< bool > flags_temp_
std::vector< Ptr< Vector< Real > > > vectors_
std::vector< Ptr< Vector< Real > > > vectors_trial_
std::vector< Ptr< Vector< Real > > > vectors_temp_
int maxIndex_
int maxIndex_trial_
int maxIndex_temp_
bool trial_
bool temp_
bool objUpdated_
bool conUpdated_

Detailed Description

template<class Real, class Key = std::vector<Real>>
class ROL::ROL::VectorController< Real, Key >

Definition at line 21 of file ROL_Constraint_SerialSimOpt.hpp.

Constructor & Destructor Documentation

◆ VectorController()

Member Function Documentation

◆ reset()

template<class Real, class Key>
void ROL::ROL::VectorController< Real, Key >::reset ( bool flag = true)

Definition at line 25 of file ROL_VectorController_Def.hpp.

References flags_, and indices_.

Referenced by accept(), and constraintUpdate().

◆ objectiveUpdate() [1/2]

template<class Real, class Key>
void ROL::ROL::VectorController< Real, Key >::objectiveUpdate ( bool flag = true)

Objective function update for VectorController storage.

Definition at line 34 of file ROL_VectorController_Def.hpp.

References temp_.

◆ constraintUpdate() [1/2]

template<class Real, class Key>
void ROL::ROL::VectorController< Real, Key >::constraintUpdate ( bool flag = true)

Equality constraint update for VectorController storage.

Definition at line 48 of file ROL_VectorController_Def.hpp.

References conUpdated_, objUpdated_, reset(), temp_, and trial_.

◆ objectiveUpdate() [2/2]

template<class Real, class Key>
void ROL::ROL::VectorController< Real, Key >::objectiveUpdate ( UpdateType type)

Objective function update for VectorController storage.

Definition at line 62 of file ROL_VectorController_Def.hpp.

◆ constraintUpdate() [2/2]

template<class Real, class Key>
void ROL::ROL::VectorController< Real, Key >::constraintUpdate ( UpdateType type)

Constraint update for VectorController storage.

Definition at line 89 of file ROL_VectorController_Def.hpp.

References ROL::ROL::Temp.

◆ isNull() [1/2]

template<class Real, class Key>
bool ROL::ROL::VectorController< Real, Key >::isNull ( const Key & param) const

Check if vector associated with provided key is allocated.

Definition at line 116 of file ROL_VectorController_Def.hpp.

References indices_trial_, isNull(), temp_, and trial_.

Referenced by allocate(), isNull(), and set().

◆ isComputed() [1/2]

template<class Real, class Key>
bool ROL::ROL::VectorController< Real, Key >::isComputed ( const Key & param) const

Check if vector has been computed.

Definition at line 132 of file ROL_VectorController_Def.hpp.

References flags_, flags_temp_, flags_trial_, indices_, indices_temp_, indices_trial_, isComputed(), temp_, and trial_.

Referenced by isComputed(), and set().

◆ allocate() [1/2]

template<class Real, class Key>
void ROL::ROL::VectorController< Real, Key >::allocate ( const Vector< Real > & x,
const Key & param )

Allocate the vector associated with provided key.

Definition at line 148 of file ROL_VectorController_Def.hpp.

References allocate(), flags_, flags_temp_, flags_trial_, indices_, indices_temp_, indices_trial_, maxIndex_, maxIndex_temp_, maxIndex_trial_, temp_, trial_, vectors_, vectors_temp_, and vectors_trial_.

Referenced by allocate().

◆ set() [1/4]

template<class Real, class Key>
const Ptr< Vector< Real > > ROL::ROL::VectorController< Real, Key >::set ( const Key & param)

Set the vector associated with provided key. This assumes the vector data will be changed.

Definition at line 179 of file ROL_VectorController_Def.hpp.

References flags_, flags_temp_, flags_trial_, indices_, indices_temp_, indices_trial_, maxIndex_, maxIndex_temp_, maxIndex_trial_, set(), temp_, trial_, vectors_, vectors_temp_, and vectors_trial_.

Referenced by accept(), push(), set(), and set().

◆ get() [1/4]

template<class Real, class Key>
const Ptr< const Vector< Real > > ROL::ROL::VectorController< Real, Key >::get ( const Key & param) const

Return the vector associated with provided key.

Definition at line 163 of file ROL_VectorController_Def.hpp.

References flags_, flags_temp_, flags_trial_, get(), indices_, indices_temp_, indices_trial_, maxIndex_, maxIndex_temp_, maxIndex_trial_, temp_, trial_, vectors_, vectors_temp_, and vectors_trial_.

Referenced by get(), and get().

◆ get() [2/4]

template<class Real, class Key>
bool ROL::ROL::VectorController< Real, Key >::get ( Vector< Real > & x,
const Key & param )

Return vector corresponding to input parameter.

Definition at line 195 of file ROL_VectorController_Def.hpp.

References flags_, flags_temp_, flags_trial_, get(), indices_, indices_temp_, indices_trial_, maxIndex_, maxIndex_temp_, maxIndex_trial_, temp_, trial_, vectors_, vectors_temp_, and vectors_trial_.

◆ set() [2/4]

template<class Real, class Key>
void ROL::ROL::VectorController< Real, Key >::set ( const Vector< Real > & x,
const Key & param )

◆ push()

template<class Real, class Key>
void ROL::ROL::VectorController< Real, Key >::push ( VectorController< Real, Key > & to) const

Push the contents of *this into another VectorController.

Definition at line 227 of file ROL_VectorController_Def.hpp.

References indices_, set(), VectorController(), and vectors_.

◆ resetTrial()

template<class Real, class Key>
void ROL::ROL::VectorController< Real, Key >::resetTrial ( void )
private

Definition at line 234 of file ROL_VectorController_Def.hpp.

References flags_trial_, and indices_trial_.

◆ resetTemp()

template<class Real, class Key>
void ROL::ROL::VectorController< Real, Key >::resetTemp ( void )
private

Definition at line 241 of file ROL_VectorController_Def.hpp.

References flags_temp_, and indices_temp_.

◆ isNull() [2/2]

template<class Real, class Key>
bool ROL::ROL::VectorController< Real, Key >::isNull ( const Key & param,
const std::map< Key, int > & indices ) const
private

Definition at line 248 of file ROL_VectorController_Def.hpp.

◆ isComputed() [2/2]

template<class Real, class Key>
bool ROL::ROL::VectorController< Real, Key >::isComputed ( const Key & param,
const std::map< Key, int > & indices,
const std::vector< bool > & flags ) const
private

Definition at line 254 of file ROL_VectorController_Def.hpp.

◆ allocate() [2/2]

template<class Real, class Key>
void ROL::ROL::VectorController< Real, Key >::allocate ( const Vector< Real > & x,
const Key & param,
std::map< Key, int > & indices,
std::vector< bool > & flags,
std::vector< Ptr< Vector< Real > > > & vectors,
int & maxIndex ) const
private

Definition at line 264 of file ROL_VectorController_Def.hpp.

References ROL::ROL::Vector< Real >::clone(), and isNull().

◆ get() [3/4]

template<class Real, class Key>
const Ptr< const Vector< Real > > ROL::ROL::VectorController< Real, Key >::get ( const Key & param,
const std::map< Key, int > & indices,
const std::vector< bool > & flags,
const std::vector< Ptr< Vector< Real > > > & vectors,
const int & maxIndex ) const
private

Definition at line 277 of file ROL_VectorController_Def.hpp.

◆ set() [3/4]

template<class Real, class Key>
const Ptr< Vector< Real > > ROL::ROL::VectorController< Real, Key >::set ( const Key & param,
std::map< Key, int > & indices,
std::vector< bool > & flags,
std::vector< Ptr< Vector< Real > > > & vectors,
int & maxIndex ) const
private

Definition at line 291 of file ROL_VectorController_Def.hpp.

References isComputed(), and isNull().

◆ get() [4/4]

template<class Real, class Key>
bool ROL::ROL::VectorController< Real, Key >::get ( Vector< Real > & x,
const Key & param,
std::map< Key, int > & indices,
std::vector< bool > & flags,
std::vector< Ptr< Vector< Real > > > & vectors,
int & maxIndex ) const
private

◆ set() [4/4]

template<class Real, class Key>
void ROL::ROL::VectorController< Real, Key >::set ( const Vector< Real > & x,
const Key & param,
std::map< Key, int > & indices,
std::vector< bool > & flags,
std::vector< Ptr< Vector< Real > > > & vectors,
int & maxIndex ) const
private

Definition at line 334 of file ROL_VectorController_Def.hpp.

References ROL::ROL::Vector< Real >::clone().

◆ accept()

template<class Real, class Key>
void ROL::ROL::VectorController< Real, Key >::accept ( void )
private

Member Data Documentation

◆ indices_

template<class Real, class Key = std::vector<Real>>
std::map<Key,int> ROL::ROL::VectorController< Real, Key >::indices_
private

◆ indices_trial_

template<class Real, class Key = std::vector<Real>>
std::map<Key,int> ROL::ROL::VectorController< Real, Key >::indices_trial_
private

◆ indices_temp_

template<class Real, class Key = std::vector<Real>>
std::map<Key,int> ROL::ROL::VectorController< Real, Key >::indices_temp_
private

◆ flags_

template<class Real, class Key = std::vector<Real>>
std::vector<bool> ROL::ROL::VectorController< Real, Key >::flags_
private

◆ flags_trial_

template<class Real, class Key = std::vector<Real>>
std::vector<bool> ROL::ROL::VectorController< Real, Key >::flags_trial_
private

◆ flags_temp_

template<class Real, class Key = std::vector<Real>>
std::vector<bool> ROL::ROL::VectorController< Real, Key >::flags_temp_
private

◆ vectors_

template<class Real, class Key = std::vector<Real>>
std::vector<Ptr<Vector<Real> > > ROL::ROL::VectorController< Real, Key >::vectors_
private

Definition at line 26 of file ROL_Constraint_SerialSimOpt.hpp.

Referenced by accept(), allocate(), get(), get(), push(), set(), set(), and VectorController().

◆ vectors_trial_

template<class Real, class Key = std::vector<Real>>
std::vector<Ptr<Vector<Real> > > ROL::ROL::VectorController< Real, Key >::vectors_trial_
private

Definition at line 26 of file ROL_Constraint_SerialSimOpt.hpp.

Referenced by accept(), allocate(), get(), get(), set(), set(), and VectorController().

◆ vectors_temp_

template<class Real, class Key = std::vector<Real>>
std::vector<Ptr<Vector<Real> > > ROL::ROL::VectorController< Real, Key >::vectors_temp_
private

Definition at line 26 of file ROL_Constraint_SerialSimOpt.hpp.

Referenced by allocate(), get(), get(), set(), set(), and VectorController().

◆ maxIndex_

template<class Real, class Key = std::vector<Real>>
int ROL::ROL::VectorController< Real, Key >::maxIndex_
private

Definition at line 27 of file ROL_Constraint_SerialSimOpt.hpp.

Referenced by accept(), allocate(), get(), get(), set(), set(), and VectorController().

◆ maxIndex_trial_

template<class Real, class Key = std::vector<Real>>
int ROL::ROL::VectorController< Real, Key >::maxIndex_trial_
private

Definition at line 27 of file ROL_Constraint_SerialSimOpt.hpp.

Referenced by allocate(), get(), get(), set(), set(), and VectorController().

◆ maxIndex_temp_

template<class Real, class Key = std::vector<Real>>
int ROL::ROL::VectorController< Real, Key >::maxIndex_temp_
private

Definition at line 27 of file ROL_Constraint_SerialSimOpt.hpp.

Referenced by allocate(), get(), get(), set(), set(), and VectorController().

◆ trial_

template<class Real, class Key = std::vector<Real>>
bool ROL::ROL::VectorController< Real, Key >::trial_
private

◆ temp_

template<class Real, class Key = std::vector<Real>>
bool ROL::ROL::VectorController< Real, Key >::temp_
private

◆ objUpdated_

template<class Real, class Key = std::vector<Real>>
bool ROL::ROL::VectorController< Real, Key >::objUpdated_
private

Definition at line 31 of file ROL_Constraint_SerialSimOpt.hpp.

Referenced by constraintUpdate(), and VectorController().

◆ conUpdated_

template<class Real, class Key = std::vector<Real>>
bool ROL::ROL::VectorController< Real, Key >::conUpdated_
private

Definition at line 31 of file ROL_Constraint_SerialSimOpt.hpp.

Referenced by constraintUpdate(), and VectorController().


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