jali_state_wrapper.h
Go to the documentation of this file.
void export_to_mesh()
Export fields to mesh file.
Definition: jali_state_wrapper.h:66
Definition: wonton.h:130
Jali_State_Wrapper & operator=(Jali_State_Wrapper const &)=delete
Assignment operator (disabled) - don't know how to implement (RVG)
Provides access to data stored in Jali_State.
Definition: jali_state_wrapper.h:31
Definition: wonton.h:84
int cell_index_in_material(int meshcell, int matid) const
Get the local index of mesh cell in material cell list.
Definition: jali_state_wrapper.h:137
void mat_get_cells(int matid, std::vector< int > *matcells) const
Get cell indices containing a particular material.
Definition: jali_state_wrapper.h:103
string_permutation names_entity_begin(Entity_kind const on_what) const
Begin iterator on vector names of specific entity type.
Definition: jali_state_wrapper.h:647
Factorize a number N into D equal (or nearly equal) factors.
Definition: adaptive_refinement_mesh.h:31
Jali_State_Wrapper(Jali::State &jali_state)
Constructor of Jali_State_Wrapper.
Definition: jali_state_wrapper.h:37
std::enable_if<(!std::is_pointer< T >::value &&!std::is_array< T >::value), void >::type mat_add_celldata(std::string const &var_name, int matid, T value)
Add a scalar multi-valued data field on cells and initialize one of its material data to a uniform va...
Definition: jali_state_wrapper.h:463
Jali_State_Wrapper(Jali_State_Wrapper &state)
Copy constructor of Jali_State_Wrapper - not a deep copy.
Definition: jali_state_wrapper.h:44
int mat_get_num_cells(int matid) const
Get number of cells containing a particular material.
Definition: jali_state_wrapper.h:92
void mat_add_cells(int matid, std::vector< int > const &newcells)
Add cells to material (or add material to cells)
Definition: jali_state_wrapper.h:496
std::enable_if<(!std::is_pointer< T >::value &&!std::is_array< T >::value), void >::type mat_add_celldata(std::string const &var_name, T value)
Add a scalar multi-valued data field on cells and initialize its material data to a single value...
Definition: jali_state_wrapper.h:369
std::vector< std::string >::iterator names_begin() const
Begin iterator on vector names.
Definition: jali_state_wrapper.h:614
void mat_add_celldata(std::string const &var_name, T 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: jali_state_wrapper.h:391
Jali::State::string_permutation string_permutation
Typedef for permutation iterator on vector of strings.
Definition: jali_state_wrapper.h:640
string_permutation names_entity_end(Entity_kind const on_what) const
End iterator on vector of names of specific entity type.
Definition: jali_state_wrapper.h:655
Definition: wonton.h:88
Field_type
Field type - whether it is mesh field or multi-material field.
Definition: wonton.h:187
std::vector< std::string > names() const
Vector of names.
Definition: jali_state_wrapper.h:630
const std::type_info & get_data_type(std::string const &var_name) const
Get the data type of the given field.
Definition: jali_state_wrapper.h:596
void mat_add_celldata(std::string const &var_name, int matid, T const *values)
Add a scalar multi-valued data field on cells and add data to one of its materials.
Definition: jali_state_wrapper.h:411
int get_data_size(Entity_kind on_what, std::string const &var_name) const
Get the data size for the given field.
Definition: jali_state_wrapper.h:566
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: jali_state_wrapper.h:229
Field_type field_type(Entity_kind on_what, std::string const &var_name) const
Type of field (MESH_FIELD or MULTIMATERIAL_FIELD)
Definition: jali_state_wrapper.h:148
void mesh_add_data(Entity_kind on_what, std::string const &var_name, T const *const values)
Add a scalar single valued data field.
Definition: jali_state_wrapper.h:287
void cell_get_mats(int cellid, std::vector< int > *cellmats) const
Get the IDs of materials in a cell.
Definition: jali_state_wrapper.h:125
void mesh_get_data(Entity_kind on_what, std::string const &var_name, T **data)
Get a pointer to read-write single-valued data on the mesh.
Definition: jali_state_wrapper.h:203
void mat_rem_cells(int matid, std::vector< int > const &delcells)
Remove cells from material (or remove material from cells)
Definition: jali_state_wrapper.h:507
void init_from_mesh()
Initialize fields from mesh file.
Definition: jali_state_wrapper.h:61
void add_material(std::string const &matname, std::vector< int > const &matcells)
Add a material to state.
Definition: jali_state_wrapper.h:524
std::enable_if<(!std::is_pointer< T >::value &&!std::is_array< T >::value), void >::type mesh_add_data(Entity_kind on_what, std::string const &var_name, const T value)
Add a scalar single valued data field with uniform values.
Definition: jali_state_wrapper.h:323
int cell_get_num_mats(int cellid) const
Get number of materials contained in a cell.
Definition: jali_state_wrapper.h:115
Entity_kind get_entity(const std::string var_name) const
Get the entity type on which the given field is defined.
Definition: jali_state_wrapper.h:535
int num_materials() const
Number of materials in problem.
Definition: jali_state_wrapper.h:73
~Jali_State_Wrapper()
Empty destructor.
Definition: jali_state_wrapper.h:55
std::string material_name(int matid) const
Name of material.
Definition: jali_state_wrapper.h:81
std::vector< std::string >::iterator names_end() const
End iterator on vector names.
Definition: jali_state_wrapper.h:622
void mesh_get_data(Entity_kind on_what, std::string const &var_name, T const **data) const
Get a pointer to read-only single-valued data on the mesh.
Definition: jali_state_wrapper.h:174
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: jali_state_wrapper.h:262