18 #ifndef LIBMESH_EXODUSII_IO_HELPER_H 19 #define LIBMESH_EXODUSII_IO_HELPER_H 23 #ifdef LIBMESH_HAVE_EXODUS_API 29 #ifdef LIBMESH_FORWARD_DECLARE_ENUMS 45 #define EX_CHECK_ERR(code, msg) \ 48 libmesh_error_msg((msg)); \ 51 #define EX_EXCEPTIONLESS_CHECK_ERR(code, msg) \ 54 libMesh::err << (msg) << std::endl; \ 55 libmesh_exceptionless_error(); \ 68 #ifdef LIBMESH_COMPILER_HAS_BROKEN_ERRNO_T 108 bool run_only_on_proc0=
true,
109 bool single_precision=
false);
128 void open(
const char * filename,
bool read_only);
249 int inquire(
int req_info, std::string error_msg=
"");
274 std::map<dof_id_type, Real> & elem_var_value_map);
279 virtual void create(std::string filename);
311 const std::vector<std::set<subdomain_id_type>> & vars_active_subdomains);
332 const std::vector<Real> & values,
334 const std::vector<std::set<subdomain_id_type>> & vars_active_subdomains);
390 std::vector<std::string>
get_complex_names(
const std::vector<std::string> & names)
const;
397 const std::vector<std::set<subdomain_id_type>> & vars_active_subdomains)
const;
425 void message(
const std::string & msg);
432 void message(
const std::string & msg,
int i);
652 std::vector<std::string> & result);
659 std::vector<std::string> & names);
1254 NamesData(
size_t n_strings,
size_t string_length);
1283 #endif // LIBMESH_HAVE_EXODUS_API 1285 #endif // LIBMESH_EXODUSII_IO_HELPER_H std::string name(const ElemQuality q)
virtual void write_sidesets(const MeshBase &mesh)
static const int quad9_node_map[9]
void use_mesh_dimension_instead_of_spatial_dimension(bool val)
std::vector< int > id_list
static const int prism_inverse_face_map[5]
std::vector< int > node_num_map
static const int tet10_node_map[10]
std::vector< Real > nodal_var_values
std::vector< std::string > get_complex_names(const std::vector< std::string > &names) const
bool _elem_vars_initialized
std::vector< int > num_sides_per_set
const char * get_elem_type() const
std::vector< std::string > elem_var_names
size_t inverse_node_map_size
void write_var_names_impl(const char *var_type, int &count, std::vector< std::string > &names)
static const int quadshell4_inverse_shellface_map[2]
size_t shellface_map_size
void write_var_names(ExodusVarType type, std::vector< std::string > &names)
std::map< int, std::string > id_to_ss_names
virtual ~ExodusII_IO_Helper()
static const int tet_face_map[4]
std::string get_block_name(int index)
static const int hex_face_map[6]
void read_nodal_var_values(std::string nodal_var_name, int time_step)
static const int quad8_node_map[8]
ExodusII_IO_Helper(const ParallelObject &parent, bool v=false, bool run_only_on_proc0=true, bool single_precision=false)
void write_information_records(const std::vector< std::string > &records)
void read_var_names_impl(const char *var_type, int &count, std::vector< std::string > &result)
static const int invalid_id
static const int prism15_node_map[15]
void write_as_dimension(unsigned dim)
std::vector< int > exodus_elem_num_to_libmesh
void read_nodeset(int id)
static const int hex8_node_map[8]
static const int pyramid13_node_map[13]
void print_nodes(std::ostream &out=libMesh::out)
std::string get_side_set_name(int index)
static const int hex27_inverse_node_map[27]
static const int tet4_node_map[4]
bool _global_vars_initialized
ExodusII_IO_Helper::Conversion assign_conversion(std::string type_str)
static const int tet_inverse_face_map[4]
std::vector< int > block_ids
std::vector< int > side_list
int inquire(int req_info, std::string error_msg="")
virtual void write_nodesets(const MeshBase &mesh)
static const int trishell3_inverse_shellface_map[2]
static const int pyramid5_node_map[5]
static const int edge2_node_map[2]
std::vector< Real > time_steps
virtual void write_elements(const MeshBase &mesh, bool use_discontinuous=false)
static const int tri_inverse_edge_map[3]
std::vector< std::vector< char > > data_table
static const int pyramid_face_map[5]
ElemType get_canonical_type() const
static const int hex27_inverse_face_map[6]
const std::string exodus_type
void write_nodal_values(int var_id, const std::vector< Real > &values, int timestep)
static const int quadshell4_edge_map[4]
void check_existing_vars(ExodusVarType type, std::vector< std::string > &names, std::vector< std::string > &names_from_file)
const int * inverse_node_map
static const int pyramid14_node_map[14]
Conversion(const int *nm, size_t nm_size, const int *inm, size_t inm_size, const int *sm, size_t sm_size, const int *ism, size_t ism_size, const ElemType ct, std::string ex_type)
static const int quad_inverse_edge_map[4]
void write_element_values(const MeshBase &mesh, const std::vector< Real > &values, int timestep, const std::vector< std::set< subdomain_id_type >> &vars_active_subdomains)
void write_timestep(int timestep, Real time)
static const int prism6_node_map[6]
std::map< int, int > libmesh_elem_num_to_exodus
std::vector< int > node_list
bool _use_mesh_dimension_instead_of_spatial_dimension
const int * inverse_side_map
virtual void initialize_element_variables(std::vector< std::string > names, const std::vector< std::set< subdomain_id_type >> &vars_active_subdomains)
void open(const char *filename, bool read_only)
static const int edge_inverse_edge_map[2]
void libmesh_ignore(const Args &...)
static const int hex27_face_map[6]
char * get_char_star(int i)
static const int pyramid_inverse_face_map[5]
static const int trishell3_edge_map[3]
std::vector< int > nodeset_ids
void push_back_entry(const std::string &name)
void read_global_values(std::vector< Real > &values, int timestep)
std::vector< int > elem_list
std::vector< std::string > global_var_names
static const int edge_edge_map[2]
void read_var_names(ExodusVarType type)
std::vector< int > connect
std::vector< int > ss_ids
Conversion(const int *nm, size_t nm_size, const int *inm, size_t inm_size, const int *sm, size_t sm_size, const int *ism, size_t ism_size, const int *sfm, size_t sfm_size, const int *isfm, size_t isfm_size, size_t sfi_offset, const ElemType ct, std::string ex_type)
int get_inverse_shellface_map(int i) const
static const int quad_edge_map[4]
void set_coordinate_offset(Point p)
static const int hex20_node_map[20]
void write_global_values(const std::vector< Real > &values, int timestep)
size_t inverse_shellface_map_size
int get_inverse_node_map(int i) const
An object whose state is distributed along a set of processors.
void read_elem_in_block(int block)
static const int tri6_node_map[6]
std::size_t get_shellface_index_offset() const
static const int edge3_node_map[3]
std::map< int, int > libmesh_node_num_to_exodus
int get_node_map(int i) const
void initialize_global_variables(std::vector< std::string > names)
unsigned _write_as_dimension
std::vector< Real > elem_var_values
std::vector< char * > data_table_pointers
std::vector< int > num_node_df_per_set
char ** get_char_star_star()
int get_node_set_id(int index)
const int * shellface_map
void message(const std::string &msg)
virtual void initialize(std::string title, const MeshBase &mesh, bool use_discontinuous=false)
virtual void create(std::string filename)
static const int hex27_node_map[27]
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void read_num_time_steps()
void read_sideset(int id, int offset)
int get_inverse_side_map(int i) const
NamesData(size_t n_strings, size_t string_length)
size_t shellface_index_offset
static const int trishell3_shellface_map[2]
std::map< int, std::string > id_to_block_names
std::vector< int > elem_num_map
static const int hex_inverse_face_map[6]
static const int prism18_node_map[18]
int get_side_set_id(int index)
std::vector< int > exodus_node_num_to_libmesh
std::map< int, std::string > id_to_ns_names
void initialize_nodal_variables(std::vector< std::string > names)
std::vector< char > title
std::vector< int > num_nodes_per_set
std::string exodus_elem_type() const
static const int prism_face_map[5]
std::vector< std::string > nodal_var_names
std::string get_node_set_name(int index)
std::string current_filename
static const int trishell3_inverse_edge_map[3]
const ElemType canonical_type
OStreamProxy out(std::cout)
void read_elemental_var_values(std::string elemental_var_name, int time_step, std::map< dof_id_type, Real > &elem_var_value_map)
std::vector< char > elem_type
static const int quadshell4_shellface_map[2]
A geometric point in (x,y,z) space.
static const int tri3_node_map[3]
int get_block_id(int index)
static const int quadshell4_inverse_edge_map[4]
std::vector< int > num_df_per_set
int get_shellface_map(int i) const
int num_elem_all_sidesets
virtual void write_nodal_coordinates(const MeshBase &mesh, bool use_discontinuous=false)
const int * inverse_shellface_map
static const int nodeelem_node_map[1]
static const int tri_edge_map[3]
int get_side_map(int i) const
std::vector< std::set< subdomain_id_type > > get_complex_vars_active_subdomains(const std::vector< std::set< subdomain_id_type >> &vars_active_subdomains) const
static const int quad4_node_map[4]
size_t inverse_side_map_size
bool _nodal_vars_initialized