Skip to main content

System Coupling C++ library 2025 R1

VolumeMesh

Last update: 17.07.2025
1 /*
2  * Copyright ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
3  */
4 
5 #pragma once
6 
7 #include "SystemCouplingParticipant/LibraryType.hpp"
8 
9 #include "SystemCouplingParticipant/CommonTypes.hpp"
10 #include "SystemCouplingParticipant/MeshDefinition.hpp"
11 #include "SystemCouplingParticipant/OutputIntegerData.hpp"
12 #include "SystemCouplingParticipant/OutputVectorData.hpp"
13 
14 #include <cstddef>
15 
16 namespace sysc {
17 
26 class SYSTEM_COUPLING_PARTICIPANT_DLL VolumeMesh {
27 public:
29  std::int64_t connectivityStamp{0};
30 
32  std::int64_t coordinatesStamp{0};
33 
35  std::int64_t partitioningStamp{0};
36 
39  NodeData nodeData,
40  CellData cellData);
41 
44  NodeData nodeData,
45  FaceData faceData,
46  CellData cellData);
47 
49  VolumeMesh() = default;
50 
52  VolumeMesh(const VolumeMesh&) = default;
53 
55  VolumeMesh(VolumeMesh&&) = default;
56 
58  VolumeMesh& operator=(const VolumeMesh&) = default;
59 
62 
64  const NodeData& getNodeData() const noexcept;
65 
67  const FaceData& getFaceData() const noexcept;
68 
70  const CellData& getCellData() const noexcept;
71 
77  MeshValidityStatus checkMeshValidity() const;
78 
81  NodeData nodeData,
82  ElementTypeData faceTypeData,
83  ElementNodeCountData faceNodeCountData,
84  ElementNodeConnectivityData faceNodeConnectivityData,
85  FaceCellConnectivityData faceCellConnectivityData,
86  CellIdData cellIdData,
87  ElementTypeData cellTypeData,
88  ElementNodeConnectivityData cellNodeConnectivityData);
89 
91  std::size_t getNumNodes() const noexcept;
92 
94  std::size_t getNumCells() const noexcept;
95 
97  OutputIntegerData getNodeIds() const noexcept;
98 
100  OutputVectorData getNodeCoords() const noexcept;
101 
103  ElementTypeData getFaceTypes() const noexcept;
104 
106  OutputIntegerData getFaceNodeCounts() const noexcept;
107 
109  OutputIntegerData getFaceNodeIds() const noexcept;
110 
112  OutputIntegerData getCell0Ids() const noexcept;
113 
115  OutputIntegerData getCell1Ids() const noexcept;
116 
118  CellIdData getCellIds() const noexcept;
119 
121  ElementTypeData getCellTypes() const noexcept;
122 
124  ElementNodeConnectivityData getCellNodeConnectivity() const noexcept;
125 
128  NodeData nodeData,
129  ElementTypeData cellTypes,
130  ElementNodeConnectivityData cellNodeIds);
131 
134  NodeData nodeData,
135  ElementNodeCountData faceNodeCounts,
136  ElementNodeConnectivityData faceNodeIds,
137  FaceCellConnectivityData faceToCellConnectivity,
138  CellIdData cellIds);
139 
140 private:
141  NodeData m_nodes;
142  FaceData m_faces;
143  CellData m_cells;
144 };
145 
146 } // namespace sysc
Provide a class for output integer data.
Provide a class for output vector data.
Provide a volume mesh access class.
Definition: VolumeMesh.hpp:26
VolumeMesh & operator=(const VolumeMesh &)=default
Provide a copy-assign operator.
VolumeMesh()=default
Provide a default constructor.
VolumeMesh(NodeData nodeData, CellData cellData)
Provide a constructor for element-based volume mesh.
VolumeMesh(const VolumeMesh &)=default
Provide a copy-constructor.
VolumeMesh(NodeData nodeData, FaceData faceData, CellData cellData)
Provide a constructor for face-based volume mesh.
const NodeData & getNodeData() const noexcept
Get node data.
VolumeMesh & operator=(VolumeMesh &&)=default
Provide a move-assign operator.
VolumeMesh(VolumeMesh &&)=default
Provide a move-constructor.
Cell data access struct, provides read-only access to the mesh cells.
Cell ids struct, provides read-only access to the mesh cell ids.
Describes element-to-node connectivity.
Describes element node counts.
Element types access struct, provides read-only access to the mesh element types.
Describes face-to-cell connectivity.
Face data access struct, provides read-only access to the mesh faces.
Provide a struct that contains information about mesh validity.
Node data access struct, provides read-only access to the mesh nodes.

Connect with Ansys