20 #ifndef LIBMESH_QOI_SET_H 21 #define LIBMESH_QOI_SET_H 25 #include "libmesh/libmesh_common.h" 77 return _i == other.
_i;
83 return _i != other.
_i;
122 QoISet(
const std::vector<unsigned int> & indices);
138 void add_indices(
const std::vector<unsigned int> & indices);
196 _indices(), _weights()
252 #endif // LIBMESH_QOI_SET_H void add_index(std::size_t)
Add this index to the set to be calculated.
void set_weight(std::size_t, Real)
Set the weight for this index.
const std::vector< bool > & _vecbool
iterator begin() const
Return an iterator pointing to the first index in the set.
Data structure for specifying which Quantities of Interest should be calculated in an adjoint or a pa...
The libMesh namespace provides an interface to certain functionality in the library.
bool operator==(const iterator &other) const
std::vector< bool > _indices
Interpret _indices.empty() to mean "calculate all indices".
bool has_index(std::size_t) const
Return whether or not this index is in the set to be calculated.
std::size_t operator*() const
Manages consistently variables, degrees of freedom, and coefficient vectors.
QoISet()
Empty constructor: "calculate all QoIs in the System".
std::size_t size(const System &sys) const
Real weight(std::size_t) const
Get the weight for this index (default 1.0)
std::vector< Real > _weights
Interpret _weights.size() <= i to mean "weight i = 1.0".
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void remove_index(std::size_t)
Remove this index from the set to be calculated.
void add_indices(const std::vector< unsigned int > &indices)
Add this indices to the set to be calculated.
QoISet(std::vector< bool > indices)
Constructor-from-vector-of-bool: "calculate the QoIs for which \p indices[q] is true".
iterator(std::size_t i, const std::vector< bool > &v)
bool operator!=(const iterator &other) const
void remove_indices(const std::vector< unsigned int > &indices)
Remove these indices from the set to be calculated.
void clear()
Resets to "calculate all QoIs, give every QoI weight 1.0".