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

#include <ROL_VectorController.hpp>

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::VectorController< Real, Key >

Definition at line 21 of file ROL_VectorController.hpp.

Constructor & Destructor Documentation

◆ VectorController()

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

Constructor.

Referenced by push().

Member Function Documentation

◆ reset()

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

◆ objectiveUpdate() [1/2]

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

Objective function update for VectorController storage.

◆ constraintUpdate() [1/2]

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

Equality constraint update for VectorController storage.

◆ objectiveUpdate() [2/2]

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

Objective function update for VectorController storage.

◆ constraintUpdate() [2/2]

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

Constraint update for VectorController storage.

◆ isNull() [1/2]

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

Check if vector associated with provided key is allocated.

◆ isComputed() [1/2]

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

Check if vector has been computed.

◆ allocate() [1/2]

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

Allocate the vector associated with provided key.

◆ set() [1/4]

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

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

Referenced by ROL::ScalarController< Real, Key >::set().

◆ get() [1/4]

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

Return the vector associated with provided key.

Referenced by ROL::ScalarController< Real, Key >::get().

◆ get() [2/4]

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

Return vector corresponding to input parameter.

◆ set() [2/4]

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

Set vector corresponding to input parameter.

◆ push()

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

Push the contents of *this into another VectorController.

References VectorController().

◆ resetTrial()

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

◆ resetTemp()

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

◆ isNull() [2/2]

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

◆ isComputed() [2/2]

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

◆ allocate() [2/2]

template<class Real, class Key = std::vector<Real>>
void 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

◆ get() [3/4]

template<class Real, class Key = std::vector<Real>>
const Ptr< const Vector< Real > > 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

◆ set() [3/4]

template<class Real, class Key = std::vector<Real>>
const Ptr< Vector< Real > > 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

◆ get() [4/4]

template<class Real, class Key = std::vector<Real>>
bool 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 = std::vector<Real>>
void 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

◆ accept()

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

Member Data Documentation

◆ indices_

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

Definition at line 24 of file ROL_VectorController.hpp.

◆ indices_trial_

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

Definition at line 24 of file ROL_VectorController.hpp.

◆ indices_temp_

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

Definition at line 24 of file ROL_VectorController.hpp.

◆ flags_

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

Definition at line 25 of file ROL_VectorController.hpp.

◆ flags_trial_

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

Definition at line 25 of file ROL_VectorController.hpp.

◆ flags_temp_

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

Definition at line 25 of file ROL_VectorController.hpp.

◆ vectors_

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

Definition at line 26 of file ROL_VectorController.hpp.

◆ vectors_trial_

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

Definition at line 26 of file ROL_VectorController.hpp.

◆ vectors_temp_

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

Definition at line 26 of file ROL_VectorController.hpp.

◆ maxIndex_

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

Definition at line 27 of file ROL_VectorController.hpp.

◆ maxIndex_trial_

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

Definition at line 27 of file ROL_VectorController.hpp.

◆ maxIndex_temp_

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

Definition at line 27 of file ROL_VectorController.hpp.

◆ trial_

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

Definition at line 30 of file ROL_VectorController.hpp.

◆ temp_

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

Definition at line 30 of file ROL_VectorController.hpp.

◆ objUpdated_

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

Definition at line 31 of file ROL_VectorController.hpp.

◆ conUpdated_

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

Definition at line 31 of file ROL_VectorController.hpp.


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