45#ifndef ROL_SIMCONTROLLER_H
46#define ROL_SIMCONTROLLER_H
53template <
class Real,
class Key=std::vector<Real>>
104 const Ptr<Vector<Real>>
set(
const Key ¶m);
108 const Ptr<const Vector<Real>>
get(
const Key ¶m)
const;
128 bool isNull(
const Key ¶m,
const std::map<Key,int> &indices)
const;
130 bool isComputed(
const Key ¶m,
const std::map<Key,int> &indices,
131 const std::vector<bool> &flags)
const;
134 std::map<Key,int> &indices, std::vector<bool> &flags,
135 std::vector<Ptr<
Vector<Real>>> &vectors,
int &maxIndex)
const;
137 const Ptr<const Vector<Real>>
get(
const Key ¶m,
138 const std::map<Key,int> &indices,
const std::vector<bool> &flags,
139 const std::vector<Ptr<
Vector<Real>>> &vectors,
const int &maxIndex)
const;
141 const Ptr<Vector<Real>>
set(
const Key ¶m,
142 std::map<Key,int> &indices, std::vector<bool> &flags,
143 std::vector<Ptr<
Vector<Real>>> &vectors,
int &maxIndex)
const;
146 std::map<Key,int> &indices, std::vector<bool> &flags,
147 std::vector<Ptr<
Vector<Real>>> &vectors,
int &maxIndex)
const;
150 std::map<Key,int> &indices, std::vector<bool> &flags,
151 std::vector<Ptr<
Vector<Real>>> &vectors,
int &maxIndex)
const;
void allocate(const Vector< Real > &x, const Key ¶m, std::map< Key, int > &indices, std::vector< bool > &flags, std::vector< Ptr< Vector< Real > > > &vectors, int &maxIndex) const
void constraintUpdate(UpdateType type)
Constraint update for VectorController storage.
bool isNull(const Key ¶m) const
Check if vector associated with provided key is allocated.
void allocate(const Vector< Real > &x, const Key ¶m)
Allocate the vector associated with provided key.
std::vector< bool > flags_trial_
void reset(bool flag=true)
std::vector< Ptr< Vector< Real > > > vectors_
bool isNull(const Key ¶m, const std::map< Key, int > &indices) const
bool get(Vector< Real > &x, const Key ¶m, std::map< Key, int > &indices, std::vector< bool > &flags, std::vector< Ptr< Vector< Real > > > &vectors, int &maxIndex) const
void objectiveUpdate(bool flag=true)
Objective function update for VectorController storage.
std::vector< Ptr< Vector< Real > > > vectors_trial_
void set(const Vector< Real > &x, const Key ¶m, std::map< Key, int > &indices, std::vector< bool > &flags, std::vector< Ptr< Vector< Real > > > &vectors, int &maxIndex) const
std::map< Key, int > indices_temp_
VectorController(void)
Constructor.
void push(VectorController< Real, Key > &to) const
Push the contents of *this into another VectorController.
void set(const Vector< Real > &x, const Key ¶m)
Set vector corresponding to input parameter.
std::vector< bool > flags_temp_
std::vector< bool > flags_
std::map< Key, int > indices_
void objectiveUpdate(UpdateType type)
Objective function update for VectorController storage.
bool isComputed(const Key ¶m, const std::map< Key, int > &indices, const std::vector< bool > &flags) const
bool isComputed(const Key ¶m) const
Check if vector has been computed.
const Ptr< Vector< Real > > set(const Key ¶m)
Set the vector associated with provided key. This assumes the vector data will be changed.
const Ptr< Vector< Real > > set(const Key ¶m, std::map< Key, int > &indices, std::vector< bool > &flags, std::vector< Ptr< Vector< Real > > > &vectors, int &maxIndex) const
std::map< Key, int > indices_trial_
bool get(Vector< Real > &x, const Key ¶m)
Return vector corresponding to input parameter.
std::vector< Ptr< Vector< Real > > > vectors_temp_
void constraintUpdate(bool flag=true)
Equality constraint update for VectorController storage.
const Ptr< const Vector< Real > > get(const Key ¶m) const
Return the vector associated with provided key.
const Ptr< const Vector< Real > > get(const Key ¶m, const std::map< Key, int > &indices, const std::vector< bool > &flags, const std::vector< Ptr< Vector< Real > > > &vectors, const int &maxIndex) const
Defines the linear algebra or vector space interface.