Used to specify quantities of interest in a simulation. More...
#include <qoi_set.h>
Classes | |
class | iterator |
Public Member Functions | |
QoISet () | |
QoISet (const System &sys) | |
QoISet (const std::vector< bool > &indices) | |
QoISet (const std::vector< unsigned int > &indices) | |
void | clear () |
std::size_t | size (const System &sys) const |
void | add_indices (const std::vector< unsigned int > &indices) |
void | add_index (std::size_t) |
void | remove_indices (const std::vector< unsigned int > &indices) |
void | remove_index (std::size_t) |
void | set_weight (std::size_t, Real) |
Real | weight (std::size_t) const |
bool | has_index (std::size_t) const |
iterator | begin () const |
Private Attributes | |
std::vector< bool > | _indices |
std::vector< Real > | _weights |
Used to specify quantities of interest in a simulation.
Data structure for specifying which Quantities of Interest should be calculated in an adjoint or a parameter sensitivity calculation.
|
inline |
|
explicit |
|
inlineexplicit |
|
inlineexplicit |
Constructor-from-vector: "calculate the listed QoIs", "give every QoI weight 1.0"
Definition at line 192 of file qoi_set.h.
References add_indices().
|
inline |
void libMesh::QoISet::add_indices | ( | const std::vector< unsigned int > & | indices | ) |
Add this indices to the set to be calculated
Definition at line 46 of file qoi_set.C.
References _indices, and std::max().
Referenced by QoISet().
|
inline |
|
inline |
|
inline |
Return whether or not this index is in the set to be calculated
Definition at line 221 of file qoi_set.h.
References _indices.
Referenced by libMesh::ImplicitSystem::adjoint_qoi_parameter_sensitivity(), libMesh::ImplicitSystem::adjoint_solve(), libMesh::SensitivityData::allocate_data(), libMesh::SensitivityData::allocate_hessian_data(), libMesh::ExplicitSystem::assemble_qoi(), libMesh::FEMSystem::assemble_qoi(), libMesh::ExplicitSystem::assemble_qoi_derivative(), libMesh::FEMSystem::assemble_qoi_derivative(), libMesh::AdjointRefinementEstimator::estimate_error(), libMesh::AdjointResidualErrorEstimator::estimate_error(), libMesh::ImplicitSystem::forward_qoi_parameter_sensitivity(), libMesh::ImplicitSystem::qoi_parameter_hessian(), libMesh::ImplicitSystem::qoi_parameter_hessian_vector_product(), size(), and libMesh::ImplicitSystem::weighted_sensitivity_adjoint_solve().
|
inline |
|
inline |
|
inline |
std::size_t libMesh::QoISet::size | ( | const System & | sys | ) | const |
sys
Definition at line 35 of file qoi_set.C.
References has_index(), and libMesh::System::n_qois().
Referenced by libMesh::System::qoi_parameter_sensitivity().
|
inline |
Get the weight for this index (default 1.0)
Definition at line 240 of file qoi_set.h.
References _weights.
Referenced by libMesh::AdjointRefinementEstimator::estimate_error(), and libMesh::AdjointResidualErrorEstimator::estimate_error().
|
private |
Interpret _indices.empty() to mean "calculate all indices"
Definition at line 176 of file qoi_set.h.
Referenced by add_index(), add_indices(), begin(), clear(), has_index(), remove_index(), and remove_indices().
|
private |
Interpret _weights.size() <= i to mean "weight i = 1.0"
Definition at line 181 of file qoi_set.h.
Referenced by clear(), set_weight(), and weight().