21#include "iogn_export.h"
43 throw std::exception();
48 std::vector<double> coordinates{};
50 const std::vector<int> globalNumberOfElementsInBlock{};
51 const std::vector<int> localNumberOfElementsInBlock{};
52 const std::vector<Topology> blockTopologicalData{};
54 const int globalNumberOfNodes{0};
56 const std::vector<int> globalIdsOfLocalElements{};
57 const std::vector<int> globalIdsOfLocalNodes{};
59 std::vector<SharedNode> sharedNodes{};
70 ExodusData(std::vector<double> coords, std::vector<std::vector<int>> elemBlockConnectivity,
71 std::vector<int> globalNumOfElemsInBlock, std::vector<int> localNumOfElemsInBlock,
72 std::vector<Topology> blockTopoData,
int globalNumNodes,
73 std::vector<int> globalIdsOfLocalElems, std::vector<int> globalIdsLocalNodes,
74 std::vector<std::vector<int>> sidesetConn = std::vector<std::vector<int>>(),
75 std::vector<Ioss::NameList> sidesetBlocks = std::vector<Ioss::NameList>())
76 : coordinates(std::move(coords)),
77 elementBlockConnectivity(std::move(elemBlockConnectivity)),
78 globalNumberOfElementsInBlock(std::move(globalNumOfElemsInBlock)),
79 localNumberOfElementsInBlock(std::move(localNumOfElemsInBlock)),
80 blockTopologicalData(std::move(blockTopoData)), globalNumberOfNodes(globalNumNodes),
81 globalIdsOfLocalElements(std::move(globalIdsOfLocalElems)),
82 globalIdsOfLocalNodes(std::move(globalIdsLocalNodes)),
83 sidesetConnectivity(std::move(sidesetConn)),
84 sidesetTouchingBlocks(std::move(sidesetBlocks))
91 const std::vector<double> coordinates{};
92 const std::vector<int> surfaceAConnectivity{};
93 const std::vector<int> surfaceBConnectivity{};
95 int globalNumberOfNodes{};
96 int globalNumberOfElements{};
98 int globalNumberOfElementsSurface1{};
99 int globalNumberOfElementsSurface2{};
101 std::vector<int> globalIdsOfLocalElements{};
102 std::vector<int> globalIdsOfLocalNodes{};
104 std::vector<SharedNode> sharedNodes{};
107 std::vector<int> connectivity2)
108 : coordinates(std::move(coords)), surfaceAConnectivity(std::move(connectivity1)),
109 surfaceBConnectivity(std::move(connectivity2))
111 this->setSerialDefaults();
121 globalNumberOfElements = globalNumberOfElementsSurface1 + globalNumberOfElementsSurface2;
123 globalIdsOfLocalElements.resize(globalNumberOfElements);
124 globalIdsOfLocalNodes.resize(globalNumberOfNodes);
126 for (
size_t i = 0; i < globalIdsOfLocalElements.size(); i++) {
127 globalIdsOfLocalElements[i] = i + 1;
130 for (
size_t i = 0; i < globalIdsOfLocalNodes.size(); i++) {
131 globalIdsOfLocalNodes[i] = i + 1;
147 IOSS_NODISCARD int64_t element_count(int64_t surfaceNumber)
const override;
149 IOSS_NODISCARD int64_t element_count_proc(int64_t block_number)
const override;
154 IOSS_NODISCARD int64_t nodeset_node_count_proc(int64_t
id)
const override;
157 IOSS_NODISCARD int64_t sideset_side_count_proc(int64_t
id)
const override;
159 IOSS_NODISCARD int64_t communication_node_count_proc()
const override;
161 void coordinates(
double *coord)
const override;
162 void coordinates(std::vector<double> &coord)
const override;
163 void coordinates(
int component, std::vector<double> &xyz)
const override;
164 void coordinates(
int component,
double *xyz)
const override;
165 void coordinates(std::vector<double> &x, std::vector<double> &y,
166 std::vector<double> &z)
const override;
168 void connectivity(int64_t block_number,
int *connect)
const override;
170 IOSS_NODISCARD std::pair<std::string, int> topology_type(int64_t block_number)
const override;
172 void sideset_elem_sides(int64_t setId, std::vector<int64_t> &elem_sides)
const override;
174 void nodeset_nodes(int64_t nset_id, std::vector<int64_t> &nodes)
const override;
176 void node_communication_map(std::vector<int64_t> &map, std::vector<int> &proc)
override;
178 void node_map(std::vector<int> &map)
const override;
179 void node_map(std::vector<int64_t> &map)
const override;
181 void element_map(int64_t block_number, std::vector<int> &map)
const override;
182 void element_map(int64_t block_number, std::vector<int64_t> &map)
const override;
183 void element_map(std::vector<int64_t> &map)
const override;
184 void element_map(std::vector<int> &map)
const override;
187 std::string get_sideset_topology()
const override;
201 IOSS_NODISCARD int64_t element_count(int64_t blockNumber)
const override;
203 IOSS_NODISCARD int64_t element_count_proc(int64_t blockNumber)
const override;
208 IOSS_NODISCARD int64_t nodeset_node_count_proc(int64_t
id)
const override;
211 IOSS_NODISCARD int64_t sideset_side_count_proc(int64_t
id)
const override;
213 IOSS_NODISCARD int64_t communication_node_count_proc()
const override;
215 void coordinates(
double *coord)
const override;
216 void coordinates(std::vector<double> &coord)
const override;
217 void coordinates(
int component, std::vector<double> &xyz)
const override;
218 void coordinates(
int component,
double *xyz)
const override;
219 void coordinates(std::vector<double> &x, std::vector<double> &y,
220 std::vector<double> &z)
const override;
222 void connectivity(int64_t blockNumber,
int *connectivityForBlock)
const override;
224 IOSS_NODISCARD std::pair<std::string, int> topology_type(int64_t blockNumber)
const override;
226 void sideset_elem_sides(int64_t setId, std::vector<int64_t> &elem_sides)
const override;
228 Ioss::NameList sideset_touching_blocks(int64_t setId)
const override;
230 void nodeset_nodes(int64_t nset_id, std::vector<int64_t> &nodes)
const override;
232 void node_communication_map(std::vector<int64_t> &map, std::vector<int> &proc)
override;
234 void node_map(std::vector<int> &map)
const override;
235 void node_map(std::vector<int64_t> &map)
const override;
237 void element_map(int64_t blockNumber, std::vector<int> &map)
const override;
238 void element_map(int64_t blockNumber, std::vector<int64_t> &map)
const override;
239 void element_map(std::vector<int64_t> &map)
const override;
240 void element_map(std::vector<int> &map)
const override;
243 std::string get_sideset_topology()
const override;
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:55
Definition Iogn_DashSurfaceMesh.h:137
DashSurfaceMesh(DashSurfaceData &dashSurfaceData)
Definition Iogn_DashSurfaceMesh.h:139
DashSurfaceData mDashSurfaceData
Definition Iogn_DashSurfaceMesh.h:189
Definition Iogn_DashSurfaceMesh.h:193
int64_t mLocalNumberOfElements
Definition Iogn_DashSurfaceMesh.h:246
int64_t mGlobalNumberOfElements
Definition Iogn_DashSurfaceMesh.h:245
std::vector< int64_t > mElementOffsetForBlock
Definition Iogn_DashSurfaceMesh.h:249
const ExodusData & mExodusData
Definition Iogn_DashSurfaceMesh.h:248
Definition Iogn_GeneratedMesh.h:23
static const char * name
Definition Ioss_Beam2.h:19
static const char * name
Definition Ioss_Hex8.h:19
static const char * name
Definition Ioss_Shell4.h:19
A namespace for the generated database format.
Definition Iogn_DashSurfaceMesh.C:12
Topology
Definition Iogn_DashSurfaceMesh.h:34
@ Hex8
Definition Iogn_DashSurfaceMesh.h:34
@ Beam2
Definition Iogn_DashSurfaceMesh.h:34
@ Shell4
Definition Iogn_DashSurfaceMesh.h:34
@ NUMBER_OF_SURFACES
Definition Iogn_DashSurfaceMesh.h:25
@ NUM_NODES_PER_QUAD_FACE
Definition Iogn_DashSurfaceMesh.h:25
@ SPATIAL_DIMENSION
Definition Iogn_DashSurfaceMesh.h:25
@ INVALID
Definition Iogn_DashSurfaceMesh.h:25
IOSS_NODISCARD std::string getTopologyName(Topology topology)
Definition Iogn_DashSurfaceMesh.h:36
Ioss::NameList NameList
Definition Ioss_ChangeSetFactory.h:25
Definition Iogn_DashSurfaceMesh.h:90
DashSurfaceData(std::vector< double > coords, std::vector< int > connectivity1, std::vector< int > connectivity2)
Definition Iogn_DashSurfaceMesh.h:106
void setSerialDefaults()
Definition Iogn_DashSurfaceMesh.h:115
Definition Iogn_DashSurfaceMesh.h:47
std::vector< Ioss::NameList > sidesetTouchingBlocks
Definition Iogn_DashSurfaceMesh.h:67
std::vector< std::vector< int > > sidesetConnectivity
Definition Iogn_DashSurfaceMesh.h:66
ExodusData(std::vector< double > coords, std::vector< std::vector< int > > elemBlockConnectivity, std::vector< int > globalNumOfElemsInBlock, std::vector< int > localNumOfElemsInBlock, std::vector< Topology > blockTopoData, int globalNumNodes, std::vector< int > globalIdsOfLocalElems, std::vector< int > globalIdsLocalNodes, std::vector< std::vector< int > > sidesetConn=std::vector< std::vector< int > >(), std::vector< Ioss::NameList > sidesetBlocks=std::vector< Ioss::NameList >())
Definition Iogn_DashSurfaceMesh.h:70
const std::vector< std::vector< int > > elementBlockConnectivity
Definition Iogn_DashSurfaceMesh.h:49
Definition Iogn_DashSurfaceMesh.h:28