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