26#include "ioexnl_export.h"
33#define EXU_USE_HOPSCOTCH
34#if defined EXU_USE_HOPSCOTCH
36#elif defined EXU_USE_ROBIN
50 using EntityIdSet = std::set<std::pair<int64_t, int64_t>>;
52 using SideSetMap = std::map<std::string, const std::string, std::less<>>;
54 using NameTopoKey = std::pair<std::string, const Ioss::ElementTopology *>;
59 assert(lhs.second !=
nullptr);
60 assert(rhs.second !=
nullptr);
61 return lhs.first < rhs.first ||
62 (!(rhs.first < lhs.first) && lhs.second->name() < rhs.second->name());
70 return std::hash<std::string>{}(name_topo.first) +
71 std::hash<size_t>{}((size_t)name_topo.second);
75#if defined EXU_USE_HOPSCOTCH
77#elif defined EXU_USE_ROBIN
81 using TopologyMap = std::map<NameTopoKey, int, NameTopoKeyCompare>;
86 int exodusFilePtr,
int processor_count,
100 const std::string &name);
103 IOEXNL_EXPORT
void exodus_error(
int exoid,
int lineno,
const char *function,
104 const char *filename);
105 IOEXNL_EXPORT
void exodus_error(
int exoid,
int lineno,
const char *function,
const char *filename,
106 const std::string &extra);
117 std::string *disp_name);
120 int64_t
id,
const std::string &basename,
121 int length,
bool &db_has_name);
127 const std::vector<unsigned char> &node_connectivity_status);
129 template <
typename T>
131 const std::vector<int64_t> &active_node_index)
133 for (
size_t i = 0; i < active_node_index.size(); i++) {
134 data[i] = dbvals[active_node_index[i]];
143 const std::string &surface_name);
149 for (
const auto &ge : entities) {
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:55
std::set< EntityId > EntityIdSet
Definition UnitTestIotmTextMeshFixture.h:62
A collection of elements having the same topology.
Definition Ioss_ElementBlock.h:29
Base class for all 'grouping' entities. The following derived classes are typical:
Definition Ioss_GroupingEntity.h:67
A grouping entity that contains other grouping entities.
Definition Ioss_Region.h:93
Definition hopscotch_map.h:82
Definition robin_map.h:90
A namespace for the exodus database format.
Definition Ioexnl_BaseDatabaseIO.C:93
void exodus_error(int exoid, int lineno, const char *function, const char *filename)
Definition Ioexnl_Utils.C:432
std::pair< std::string, const Ioss::ElementTopology * > NameTopoKey
Definition Ioexnl_Utils.h:54
IOEXNL_EXPORT void add_coordinate_frames(int exoid, Ioss::Region *region)
std::set< std::string > SideSetSet
Definition Ioexnl_Utils.h:51
Ioss::EntityType map_exodus_type(ex_entity_type type)
Definition Ioexnl_Utils.C:95
bool set_id(const Ioss::GroupingEntity *entity, Ioexnl::EntityIdSet *idset)
Definition Ioexnl_Utils.C:271
void update_last_time_attribute(int exodusFilePtr, double value)
Definition Ioexnl_Utils.C:78
void decode_surface_name(Ioexnl::SideSetMap &fs_map, Ioexnl::SideSetSet &fs_set, const std::string &name)
Definition Ioexnl_Utils.C:233
bool find_displacement_field(Ioss::NameList &fields, const Ioss::GroupingEntity *block, int ndim, std::string *disp_name)
Definition Ioexnl_Utils.C:383
IOSS_NODISCARD IOEXNL_EXPORT const char * Version()
int64_t get_id(const Ioss::GroupingEntity *entity, Ioexnl::EntityIdSet *idset)
Definition Ioexnl_Utils.C:319
int64_t extract_id(const std::string &name_id)
Definition Ioexnl_Utils.C:300
void write_reduction_attributes(int exoid, const Ioss::GroupingEntity *ge)
Definition Ioexnl_Utils.C:608
void fix_bad_name(char *name)
Definition Ioexnl_Utils.C:416
bool filter_node_list(Ioss::Int64Vector &nodes, const std::vector< unsigned char > &node_connectivity_status)
Definition Ioexnl_Utils.C:468
std::set< std::pair< int64_t, int64_t > > EntityIdSet
Definition Ioexnl_BaseDatabaseIO.h:75
void filter_element_list(Ioss::Region *region, Ioss::Int64Vector &elements, Ioss::Int64Vector &sides, bool remove_omitted_elements)
Definition Ioexnl_Utils.C:494
void separate_surface_element_sides(Ioss::Int64Vector &element, Ioss::Int64Vector &sides, Ioss::Region *region, Ioexnl::TopologyMap &topo_map, Ioexnl::TopologyMap &side_map, Ioss::SurfaceSplitType split_type, const std::string &surface_name)
Definition Ioexnl_Utils.C:531
IOSS_NODISCARD IOEXNL_EXPORT std::string get_entity_name(int exoid, ex_entity_type type, int64_t id, const std::string &basename, int length, bool &db_has_name)
void write_coordinate_frames(int exoid, const Ioss::CoordinateFrameContainer &frames)
Definition Ioexnl_Utils.C:458
std::map< std::string, const std::string, std::less<> > SideSetMap
Definition Ioexnl_Utils.h:52
bool type_match(const std::string &type, const char *substring)
Definition Ioexnl_Utils.C:216
IOEXNL_EXPORT int add_map_fields(int exoid, Ioss::ElementBlock *block, int64_t my_element_count, size_t name_length)
bool read_last_time_attribute(int exodusFilePtr, double *value)
Definition Ioexnl_Utils.C:135
bool check_processor_info(const std::string &filename, int exodusFilePtr, int processor_count, int processor_id)
Definition Ioexnl_Utils.C:165
The main namespace for the Ioss library.
Definition Ioad_DatabaseIO.C:40
std::vector< int64_t > Int64Vector
Definition Ioss_CodeTypes.h:22
Ioss::NameList NameList
Definition Ioss_ChangeSetFactory.h:25
SurfaceSplitType
Method used to split sidesets into homogeneous blocks.
Definition Ioss_SurfaceSplit.h:11
std::vector< CoordinateFrame > CoordinateFrameContainer
Definition Ioex_Utils.h:46
EntityType
The particular type of GroupingEntity.
Definition Ioss_EntityType.h:12
Definition Ioexnl_Utils.h:56
IOSS_NODISCARD bool operator()(const NameTopoKey &lhs, const NameTopoKey &rhs) const
Definition Ioexnl_Utils.h:57
Definition Ioexnl_Utils.h:67
IOSS_NODISCARD size_t operator()(const NameTopoKey &name_topo) const
Definition Ioexnl_Utils.h:68