18#include "ioss_export.h"
22#include <unordered_set>
23#elif defined FG_USE_HOPSCOTCH
25#elif defined FG_USE_ROBIN
37 Face(
size_t id, std::array<size_t, 4> conn) : hashId_(id), connectivity_(conn) {}
38 explicit Face(std::array<size_t, 4> conn);
42 assert(element_id != 0);
43 if (element[0] == 0) {
44 element[0] = element_id;
46 else if (element[1] == 0) {
47 element[1] = element_id;
50 face_element_error(element_id);
54 int element_count()
const {
return (element[0] != 0) + (element[1] != 0); }
56 void add_element(
size_t element_id,
size_t face_ordinal)
const
58 add_element(element_id * 10 + face_ordinal);
61 void face_element_error(
size_t element_id)
const;
78 mutable std::array<size_t, 2> element{};
79 std::array<size_t, 4> connectivity_{};
113#if defined FG_USE_STD
115#elif defined FG_USE_HOPSCOTCH
118#elif defined FG_USE_ROBIN
127 static size_t id_hash(
size_t global_id);
129 template <
typename INT>
130 void generate_faces(INT ,
bool block_by_block =
false,
bool local_ids =
false);
131 template <
typename INT>
133 bool local_ids =
false);
138 void clear(
const std::string &name) { faces_[name].clear(); }
142 size_t node_id_hash(
size_t local_node_id)
const {
return hashIds_[local_node_id]; }
144 void progress(
const std::string &output)
const;
147 template <
typename INT>
void hash_node_ids(
const std::vector<INT> &node_ids);
148 void hash_local_node_ids(
size_t count);
149 template <
typename INT>
void generate_model_faces(INT ,
bool local_ids);
152 std::map<std::string, FaceUnorderedSet>
faces_;
A collection of elements having the same topology.
Definition Ioss_ElementBlock.h:29
Definition Ioss_FaceGenerator.h:123
Ioss::Region & region_
Definition Ioss_FaceGenerator.h:151
FaceUnorderedSet & faces(const std::string &name="ALL")
Definition Ioss_FaceGenerator.h:135
std::map< std::string, FaceUnorderedSet > faces_
Definition Ioss_FaceGenerator.h:152
size_t node_id_hash(size_t local_node_id) const
Given a local node id (0-based), return the hashed value.
Definition Ioss_FaceGenerator.h:142
std::vector< size_t > hashIds_
Definition Ioss_FaceGenerator.h:153
void clear(const std::string &name)
Definition Ioss_FaceGenerator.h:138
Definition Ioss_FaceGenerator.h:34
std::array< size_t, 4 > connectivity_
Definition Ioss_FaceGenerator.h:79
Face(size_t id, std::array< size_t, 4 > conn)
Definition Ioss_FaceGenerator.h:37
size_t hashId_
Definition Ioss_FaceGenerator.h:63
void add_element(size_t element_id) const
Definition Ioss_FaceGenerator.h:40
int element_count() const
Definition Ioss_FaceGenerator.h:54
void add_element(size_t element_id, size_t face_ordinal) const
Definition Ioss_FaceGenerator.h:56
A grouping entity that contains other grouping entities.
Definition Ioss_Region.h:93
Definition hopscotch_set.h:82
Definition robin_set.h:90
The main namespace for the Ioss library.
Definition Ioad_DatabaseIO.C:40
std::vector< ElementBlock * > ElementBlockContainer
Definition Ioss_Region.h:69
tsl::robin_pg_set< Face, FaceHash, FaceEqual > FaceUnorderedSet
Definition Ioss_FaceGenerator.h:120
Definition Ioss_FaceGenerator.h:88
bool operator()(const Face &left, const Face &right) const
Definition Ioss_FaceGenerator.h:89
Definition Ioss_FaceGenerator.h:83
size_t operator()(const Face &face) const
Definition Ioss_FaceGenerator.h:84