|
| Simple_State_Wrapper (const MeshWrapper &mesh, std::unordered_map< std::string, int > names={}, std::unordered_map< int, std::vector< int >> material_cells={}) |
| Constructor for the state wrapper. More...
|
|
Simple_State_Wrapper & | operator= (Simple_State_Wrapper const &)=delete |
| Assignment operator (disabled). More...
|
|
| ~Simple_State_Wrapper () |
| Destructor. More...
|
|
int | mat_get_num_cells (int m) const |
| Return the number of cells for this material id. More...
|
|
| Simple_State_Wrapper (Simple_State &state) |
| Constructor for the state wrapper. More...
|
|
Simple_State_Wrapper & | operator= (Simple_State_Wrapper const &)=delete |
| Assignment operator (disabled). More...
|
|
| ~Simple_State_Wrapper () |
| Destructor. More...
|
|
int | num_materials () const |
| Number of materials in problem. More...
|
|
std::string | material_name (int matid) const |
| Name of material. More...
|
|
int | mat_get_num_cells (int matid) const |
| Get number of cells containing a particular material. More...
|
|
void | mat_get_cells (int matid, std::vector< int > *matcells) const |
| Get cell indices containing a particular material. More...
|
|
int | cell_get_num_mats (int cellid) const |
| Get number of materials contained in a cell. More...
|
|
void | cell_get_mats (int cellid, std::vector< int > *cellmats) const |
| Get the IDs of materials in a cell. More...
|
|
int | cell_index_in_material (int meshcell, int matid) const |
| Get the local index of mesh cell in material cell list. More...
|
|
Field_type | field_type (Entity_kind on_what, std::string const &var_name) const |
| Type of field (MESH_FIELD or MULTIMATERIAL_FIELD) More...
|
|
void | mesh_get_data (Entity_kind on_what, std::string const &name, double **data) |
| Get a pointer to data from the state manager with a given variable name and on on_what mesh entities. More...
|
|
void | mesh_get_data (Entity_kind on_what, std::string const &name, double const **data) const |
| Get a pointer to data from the state manager with a given variable name and on on_what mesh entities. More...
|
|
void | mat_get_celldata (std::string const &var_name, int matid, double const **data) const |
| Get pointer to read-only scalar cell data for a particular material. More...
|
|
void | mat_get_celldata (std::string const &var_name, int matid, Wonton::Point< 2 > const **data) const |
|
void | mat_get_celldata (std::string const &var_name, int matid, Wonton::Point< 3 > const **data) const |
|
void | mat_get_celldata (std::string const &var_name, int matid, double **data) |
| Get pointer to read-write scalar data for a particular material. More...
|
|
void | mesh_add_data (Entity_kind on_what, std::string const &name, double const **data) const |
| Get a pointer to data from the state manager with a given variable name and on on_what mesh entities. More...
|
|
void | mat_add_celldata (std::string const &var_name, double value) |
| Add a scalar multi-valued data field on cells and initialize its material data to a single value. More...
|
|
void | mat_add_celldata (std::string const &var_name, double const *const *values=nullptr, Data_layout layout=Data_layout::MATERIAL_CENTRIC) |
| Add a scalar multi-valued data field on cells and initialize its material data according to a 2D array. More...
|
|
void | mat_add_celldata (std::string const &var_name, int matid, double const *values) |
| Add a scalar multi-valued data field on cells and add data to one of its materials. More...
|
|
void | mat_add_celldata (std::string const &var_name, int matid, double value) |
| Add a scalar multi-valued data field on cells and initialize one of its material data to a uniform value. More...
|
|
void | mat_add_cells (int matid, std::vector< int > const &newcells) |
| Add cells to material (or add material to cells) More...
|
|
void | mat_rem_cells (int matid, std::vector< int > const &delcells) |
| Remove cells from material (or remove material from cells) More...
|
|
void | add_material (std::string const &matname, std::vector< int > const &matcells) |
| Add a material to state. More...
|
|
| StateManager (const MeshWrapper &mesh, std::unordered_map< std::string, int > names={}, std::unordered_map< int, std::vector< int >> material_cells={}) |
| Constructor. More...
|
|
void | add_material_names (const std::unordered_map< std::string, int > &names) |
| Add the names of the materials. More...
|
|
std::vector< std::string > const | names () const |
| Return the names registered by the state manager. More...
|
|
std::string | material_name (int m) const |
| Return the name of a material from its material id. More...
|
|
int | get_material_id (std::string const &name) const |
| Return the material id from its name. More...
|
|
void | add_material_cells (std::unordered_map< int, std::vector< int >> cells) |
| Add the material cells. More...
|
|
std::unordered_map< int, std::vector< int > > const & | get_material_cells () const |
| Return the material cells. More...
|
|
std::unordered_map< int, std::unordered_set< int > > const & | get_cell_materials () const |
| Return the cell materials. More...
|
|
std::unordered_map< int, int > const | get_material_shape () const |
| Return the number of cells for each material. More...
|
|
int | num_materials () const |
| Return the number of materials in the problem. More...
|
|
Entity_kind | get_entity (std::string const &name) const |
| Return the entity kind for a state vector. More...
|
|
Field_type | field_type (Entity_kind kind, std::string const &name) const |
| Return the field type of a state vector. More...
|
|
int | get_data_size (Entity_kind on_what, std::string const &name) const |
| Return the data size . More...
|
|
const std::type_info & | get_data_type (std::string var_name) |
| Get the data type of the given field. More...
|
|
void | add (std::shared_ptr< StateVectorBase > sv) |
| Add a StateVectorBase to the state manager. More...
|
|
template<class T > |
void | add (std::shared_ptr< StateVectorUni< T >> sv) |
| Add a StateVectorUni<T> to the state manager. More...
|
|
template<class T > |
void | add (std::shared_ptr< StateVectorMulti< T >> sv) |
| Add a StateVectorMulti<T> to the state manager. More...
|
|
std::shared_ptr< StateVectorBase > | get (std::string name) |
| Get a shared pointer to a StateVectorBase from the state manager. More...
|
|
std::shared_ptr< StateVectorBase const > | get (std::string name) const |
| Get a shared pointer to a const StateVectorBase from the state manager. More...
|
|
template<typename T > |
std::shared_ptr< T > | get (std::string name) |
| Get a shared pointer to a templated type from the state manager. More...
|
|
template<typename T > |
std::shared_ptr< T > | get (std::string name) const |
| Get a shared pointer to a templated type from the state manager. More...
|
|
int | num_material_cells (int m) const |
| Return the number of cells for this material id. More...
|
|
std::vector< int > const & | get_material_cells (int m) const |
| Return the cell ids for this material id. More...
|
|
void | mat_get_cells (int m, std::vector< int > *matcells) const |
| Return the cell ids for this material id. More...
|
|
template<class T > |
void | mat_get_celldata (std::string const &name, int m, T const **data) const |
| Return the cell data for this material id. More...
|
|
int | cell_index_in_material (int c, int m) const |
| Return the cell index in this material id. More...
|
|
template<class T > |
void | mat_get_celldata (std::string const &name, int m, T **data) |
| Return the cell data for this material id. More...
|
|
int | cell_get_num_mats (int c) const |
| Return the number of materials in this cell. More...
|
|
std::unordered_set< int > | get_cell_materials (int c) const |
| Return the unordered set of materials in this cell. More...
|
|
void | cell_get_mats (int c, std::vector< int > *cellmats) const |
| Return the materials in this cell. More...
|
|
template<class T > |
void | mesh_get_data (Entity_kind on_what, std::string const &name, T const **data) const |
| Return the const cell data for this material id. More...
|
|
template<class T > |
void | mesh_get_data (Entity_kind on_what, std::string const &name, T **data) |
| Return the cell data for this material id. More...
|
|
void | mat_add_cells (int m, std::vector< int > const &newcells) |
| Add cells for a new material to the material cells. More...
|
|
template<class T > |
void | mat_add_celldata (std::string const &name, int m, T const *values) |
| Add cell data for a new material in a state vector to the state manager. More...
|
|
void | add_material (std::string const &matname, std::vector< int > const &matcells) |
| Add cell data for a new material in a state vector to the state manager. More...
|
|
template<class T = double> |
bool | shape_is_good (const std::shared_ptr< StateVectorMulti< T >> sv) |
| Check that a StateVectorMulti<T> has a shape consistent with the state manager. More...
|
|
void | clear_material_cells () |
| Clear material cells and the inverse map of cell materials. More...
|
|
Given a variable name, get where it lives on the mesh.
- Parameters
-
[in] | name | The name of the variable to be found. |
- Returns
- The Entity_kind (e.g. CELL) indicating where the variable lives.
- Exceptions
-
std::runtime_exception | Variable not found. |
This will only pick the first defined variable, if the user adds multiple fields with the same variable name, but on different Entity_kinds. This should be fixed, or get_entity should be ammended.
|
Entity_kind | get_entity (std::string const &name) const |
|
int | get_data_size (Entity_kind on_what, std::string const &name) const |
| Get the number of elements in a specific variable from the state manager. More...
|
|
const std::type_info & | get_data_type (std::string const &var_name) const |
| Get the data type of the given field. More...
|
|
Simple_State::name_vec_it | names_begin () const |
| An iterator to the beginning of the vector of names in the state manager. More...
|
|
Simple_State::name_vec_it | names_end () const |
| An iterator to the ending of the vector of names in the state manager. More...
|
|
Simple_State::name_vec | names () const |
|