OpenFCST: The open-source Fuel Cell Simulation Toolbox
|
A class that selects the named FEVector vectors in FEVectors and assigns the types of information extracted. More...
#include <mesh_worker_info.h>
Classes | |
struct | ListEntry |
The structure which stores the name of the selected FEVector as it is stored in FEVectors and the types of information extracted. More... | |
Public Member Functions | |
VectorSelector () | |
Default constructor for an empty object. | |
VectorSelector (const VectorSelector &other) | |
Copy constructor, copying everything except the cache_values, cache_gradients, and cache_hessians. | |
void | add_vector (const std::string &name, bool values=true, bool gradients=false, bool hessians=false) |
Add a FEVector name as it is stored in FEVectors to the list of selections. | |
void | cache (const FEVectors &src) |
Based on the list of selections, cache the numbers of FEVector vectors in FEVectors appropriately. | |
bool | empty () const |
Check whether any FEVector in FEVectors is selected. | |
bool | has_values () const |
Returns true if values are selected for any FEVector in FEVectors. | |
bool | has_gradients () const |
Returns true if gradients are selected for any FEVector in FEVectors. | |
bool | has_hessians () const |
Returns true if hessians are selected for any FEVector in FEVectors. | |
unsigned int | n_values () const |
The number of FEVector vectors in FEVectors selected for getting values. | |
unsigned int | n_gradients () const |
The number of FEVector vectors in FEVectors selected for getting gradients. | |
unsigned int | n_hessians () const |
The number of FEVector vectors in FEVectors selected for getting hessians. | |
unsigned int | value_index (unsigned int i) const |
The FEVector index in FEVectors for the ith value. | |
unsigned int | gradient_index (unsigned int i) const |
The FEVector index in FEVectors for the ith gradient. | |
unsigned int | hessian_index (unsigned int i) const |
The FEVector index in FEVectors for the ith hessian. | |
template<typename STREAM > | |
void | print (STREAM &s, const FEVectors &v) const |
Print the info on the selected FEVector vectors in FEVectors to the stream. | |
Private Attributes | |
std::vector< ListEntry > | selection |
The list of selections. | |
bool | selected_values |
Set to true if values are selected for any FEVector in FEVectors. | |
bool | selected_gradients |
Set to true if gradients are selected for any FEVector in FEVectors. | |
bool | selected_hessians |
Set to true if hessians are selected for any FEVector in FEVectors. | |
std::vector< unsigned int > | cache_values |
Cache indices of FEVector vectors in FEVectors for which values have been selected. | |
std::vector< unsigned int > | cache_gradients |
Cache indices of FEVector vectors in FEVectors for which gradients have been selected. | |
std::vector< unsigned int > | cache_hessians |
Cache indices of FEVector vectors in FEVectors for which hessians have been selected. | |
A class that selects the named FEVector vectors in FEVectors and assigns the types of information extracted.
These types are values, gradients, and hessians.
|
inline |
Default constructor for an empty object.
|
inline |
Copy constructor, copying everything except the cache_values, cache_gradients, and cache_hessians.
|
inline |
Add a FEVector name as it is stored in FEVectors to the list of selections.
The arguments are the name and indicators showing the types of information extracted for this name.
References MeshWorker::VectorSelector::ListEntry::gradients, MeshWorker::VectorSelector::ListEntry::hessians, MeshWorker::VectorSelector::ListEntry::name, selected_gradients, selected_hessians, selected_values, selection, and MeshWorker::VectorSelector::ListEntry::values.
|
inline |
Based on the list of selections, cache the numbers of FEVector vectors in FEVectors appropriately.
Available containers are cache_values, cache_gradients, and cache_hessians.
References cache_gradients, cache_hessians, cache_values, AppFrame::FEVectors::find_vector(), and selection.
Referenced by MeshWorker::InfoObjects::IntegrationInfo< dim, FEFaceValuesBase< dim > >::initialize_data(), and MeshWorker::InfoObjects::IntegrationInfo< dim, FEFaceValuesBase< dim > >::initialize_selector().
|
inline |
Check whether any FEVector in FEVectors is selected.
|
inline |
The FEVector index in FEVectors for the ith gradient.
Referenced by MeshWorker::selector_index().
|
inline |
Returns true if gradients are selected for any FEVector in FEVectors.
|
inline |
Returns true if hessians are selected for any FEVector in FEVectors.
|
inline |
Returns true if values are selected for any FEVector in FEVectors.
|
inline |
The FEVector index in FEVectors for the ith hessian.
Referenced by MeshWorker::selector_index().
|
inline |
The number of FEVector vectors in FEVectors selected for getting gradients.
Referenced by MeshWorker::selector_size().
|
inline |
The number of FEVector vectors in FEVectors selected for getting hessians.
Referenced by MeshWorker::selector_size().
|
inline |
The number of FEVector vectors in FEVectors selected for getting values.
Referenced by MeshWorker::selector_size().
|
inline |
Print the info on the selected FEVector vectors in FEVectors to the stream.
References cache_gradients, cache_hessians, cache_values, and AppFrame::FEVectors::vector_name().
|
inline |
The FEVector index in FEVectors for the ith value.
Referenced by MeshWorker::selector_index().
|
private |
|
private |
|
private |
|
private |
Set to true
if gradients are selected for any FEVector in FEVectors.
Referenced by add_vector().
|
private |
Set to true
if hessians are selected for any FEVector in FEVectors.
Referenced by add_vector().
|
private |
Set to true
if values are selected for any FEVector in FEVectors.
Referenced by add_vector().
|
private |
The list of selections.
Referenced by add_vector(), and cache().