flat_state_wrapper.h
Go to the documentation of this file.
114 if (not (names.size() == entities.size() and names.size() == data.size() and data.size() == entities.size())) {
Entity_kind get_entity(int index) const
Get the entity type on which the given field is defined.
Definition: flat_state_wrapper.h:299
void cell_get_mats(int cellid, std::vector< int > *cellmats) const
Get the IDs of materials in a cell.
Definition: flat_state_wrapper.h:183
std::shared_ptr< std::vector< T > > get_vector(size_t index)
Get the data vector.
Definition: flat_state_wrapper.h:350
Factorize a number N into D equal (or nearly equal) factors.
Definition: adaptive_refinement_mesh.h:31
void initialize(std::vector< std::string > const &names, std::vector< Entity_kind > const &entities, std::vector< std::shared_ptr< std::vector< T >>> const &data)
Initialize the state wrapper with explicit lists of names, entities and data.
Definition: flat_state_wrapper.h:110
A state manager wrapper that allows redistribution of data across nodes.
Definition: flat_state_mm_wrapper.h:33
size_t get_num_gradients()
Get the number of gradient vectors.
Definition: flat_state_wrapper.h:388
void mat_get_celldata(std::string const &var_name, int matid, T const **data) const
Get pointer to read-only scalar cell data for a particular material.
Definition: flat_state_wrapper.h:255
Definition: wonton.h:85
int cell_get_num_mats(int cellid) const
Get number of materials contained in a cell.
Definition: flat_state_wrapper.h:173
void mesh_get_data(Entity_kind on_what, std::string const &var_name, T const **data) const
Get pointer to scalar data.
Definition: flat_state_wrapper.h:237
int mat_get_num_cells(int matid) const
Get number of cells containing a particular material.
Definition: flat_state_wrapper.h:153
void mesh_get_data(Entity_kind on_what, std::string const &var_name, T **data)
Get pointer to scalar data.
Definition: flat_state_wrapper.h:218
Entity_kind get_entity(std::string const &var_name) const
Get the entity type on which the given field is defined.
Definition: flat_state_wrapper.h:290
std::pair< std::string, Entity_kind > pair_t
pair of name and entity to be used as data key
Definition: flat_state_wrapper.h:38
Definition: wonton.h:88
Field_type
Field type - whether it is mesh field or multi-material field.
Definition: wonton.h:187
size_t get_vector_index(Entity_kind ent, std::string const &name)
Get index for entity and name.
Definition: flat_state_wrapper.h:342
size_t get_num_vectors()
Get the number of data vectors.
Definition: flat_state_wrapper.h:366
void initialize(State_Wrapper const &input, std::vector< std::string > const &var_names)
Initialize the state wrapper with another state wrapper and a list of names.
Definition: flat_state_wrapper.h:61
std::shared_ptr< std::vector< Wonton::Point3 > > get_gradients(size_t index)
Get gradients.
Definition: flat_state_wrapper.h:358
void mat_get_cells(int matid, std::vector< int > *matcells) const
Get cell indices containing a particular material.
Definition: flat_state_wrapper.h:163
int cell_index_in_material(int meshcell, int matid) const
Get the local index of mesh cell in material cell list.
Definition: flat_state_wrapper.h:194
Field_type field_type(Entity_kind on_what, std::string const &var_name) const
Type of field (MESH_FIELD or MULTIMATERIAL_FIELD)
Definition: flat_state_wrapper.h:205
void get_names(Entity_kind on_what, std::vector< std::string > &names)
Get names of data fields associated with a given entity.
Definition: flat_state_wrapper.h:130
int num_materials() const
Number of materials in problem.
Definition: flat_state_wrapper.h:143
void mat_get_celldata(std::string const &var_name, int matid, T **data)
Get pointer to read-write scalar data for a particular material.
Definition: flat_state_wrapper.h:274
Flat_State_Wrapper()=default
Constructor of Flat_State_Wrapper.
std::vector< std::string > const names() const
Return the names registered by the state manager.
Definition: state_manager.h:79
size_t get_entity_size(Entity_kind ent)
Get size for entity.
Definition: flat_state_wrapper.h:307
const std::type_info & get_data_type(std::string const &name) const
Get the data type of the given field.
Definition: flat_state_wrapper.h:317
void add_gradients(std::shared_ptr< std::vector< Wonton::Point3 >> new_grad)
Add a gradient field.
Definition: flat_state_wrapper.h:371
size_t get_field_stride(size_t index)
Get field stride.
Definition: flat_state_wrapper.h:380
Flat_State_Wrapper & operator=(Flat_State_Wrapper const &)=delete
Assignment operator (disabled).