simple_state_wrapper.h
Go to the documentation of this file.
void add_material(std::string const &matname, std::vector< int > const &matcells)
Add a material to state.
Definition: simple_state_wrapper.h:305
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.
Definition: simple_state_wrapper.h:176
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...
Definition: simple_state_wrapper.h:156
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.
Definition: simple_state_wrapper.h:260
Simple_State::name_vec_it names_end() const
An iterator to the ending of the vector of names in the state manager.
Definition: simple_state_wrapper.h:377
A very light-weight state manager for a Simple_Mesh.
Definition: simple_state.h:43
Simple_State::name_vec_it names_begin() const
An iterator to the beginning of the vector of names in the state manager.
Definition: simple_state_wrapper.h:372
Factorize a number N into D equal (or nearly equal) factors.
Definition: adaptive_refinement_mesh.h:31
int mat_get_num_cells(int matid) const
Get number of cells containing a particular material.
Definition: simple_state_wrapper.h:66
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.
Definition: simple_state_wrapper.h:347
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 va...
Definition: simple_state_wrapper.h:276
void mat_get_celldata(std::string const &var_name, int matid, Wonton::Point< 2 > const **data) const
Definition: simple_state_wrapper.h:181
Entity_kind get_entity(std::string const &name) const
Definition: simple_state_wrapper.h:320
Simple_State::name_vec names() const
Definition: simple_state_wrapper.h:383
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...
Definition: simple_state_wrapper.h:209
Simple_State_Wrapper & operator=(Simple_State_Wrapper const &)=delete
Assignment operator (disabled).
void mat_rem_cells(int matid, std::vector< int > const &delcells)
Remove cells from material (or remove material from cells)
Definition: simple_state_wrapper.h:296
vec & add(std::string const name, Entity_kind const on_what, double const *const data=nullptr)
Add a field to the state manager.
Definition: simple_state.h:120
int cell_get_num_mats(int cellid) const
Get number of materials contained in a cell.
Definition: simple_state_wrapper.h:88
A thin wrapper that implements state methods for Simple_State needed by Wonton.
Definition: simple_state_mm_wrapper.h:26
Field_type
Field type - whether it is mesh field or multi-material field.
Definition: wonton.h:187
map_it find(std::string const name, Entity_kind const on_what=Entity_kind::ANY_KIND)
Search for a specific key (name, Entity_kind) within the map of known fields and return an iterator t...
Definition: simple_state.h:90
Simple_State_Wrapper(Simple_State &state)
Constructor for the state wrapper.
Definition: simple_state_wrapper.h:32
map_it begin()
An iterator to the beginning of the field map.
Definition: simple_state.h:67
int cell_index_in_material(int meshcell, int matid) const
Get the local index of mesh cell in material cell list.
Definition: simple_state_wrapper.h:109
int num_materials() const
Number of materials in problem.
Definition: simple_state_wrapper.h:47
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...
Definition: simple_state_wrapper.h:134
name_vec_it names_end()
An iterator to the ending fo the variable names vector.
Definition: simple_state.h:74
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 arra...
Definition: simple_state_wrapper.h:242
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...
Definition: simple_state_wrapper.h:226
std::string material_name(int matid) const
Name of material.
Definition: simple_state_wrapper.h:55
~Simple_State_Wrapper()
Destructor.
Definition: simple_state_wrapper.h:38
void cell_get_mats(int cellid, std::vector< int > *cellmats) const
Get the IDs of materials in a cell.
Definition: simple_state_wrapper.h:98
map_it end()
An iterator to the ending of the field map.
Definition: simple_state.h:69
void mat_get_celldata(std::string const &var_name, int matid, double **data)
Get pointer to read-write scalar data for a particular material.
Definition: simple_state_wrapper.h:197
void mat_add_cells(int matid, std::vector< int > const &newcells)
Add cells to material (or add material to cells)
Definition: simple_state_wrapper.h:286
A very light-weight state manager for double data living atop a Simple_Mesh.
void mat_get_cells(int matid, std::vector< int > *matcells) const
Get cell indices containing a particular material.
Definition: simple_state_wrapper.h:77
name_vec_it names_begin()
An iterator to the beginning of the variable names vector.
Definition: simple_state.h:72
Field_type field_type(Entity_kind on_what, std::string const &var_name) const
Type of field (MESH_FIELD or MULTIMATERIAL_FIELD)
Definition: simple_state_wrapper.h:120
void mat_get_celldata(std::string const &var_name, int matid, Wonton::Point< 3 > const **data) const
Definition: simple_state_wrapper.h:184
const std::type_info & get_data_type(std::string const &var_name) const
Get the data type of the given field.
Definition: simple_state_wrapper.h:363