10 #ifndef ATILACALCULATORSOFTWARE_MESH_H 11 #define ATILACALCULATORSOFTWARE_MESH_H 27 #define DIM(x) x == 3 ? GiD_3D : GiD_2D 44 Node(
unsigned int id,
const float*
coord);
52 Node(
unsigned int id,
float x,
float y,
float z);
57 unsigned int getId()
const;
83 const unsigned int id;
110 std::string getName();
115 std::string getElementName();
120 GiD_ElementType getElementType();
125 unsigned int getDimCount()
const;
130 unsigned int getNodeCount()
const;
135 unsigned int getElementCount()
const;
140 std::vector<Node> getNodes();
146 std::tuple<int&, int*> getElement(
const unsigned int&
id)
const;
160 static GiD_ElementType getGiDElementType(
const char* element);
233 #endif // ATILACALCULATORSOFTWARE_MESH_H const unsigned int id
ID of the Node.
Definition: mesh.h:83
float coord[3]
Space coordinates of the node.
Definition: mesh.h:88
unsigned int getId() const
Definition: mesh.cpp:32
Point in 3D space representation, part of a Mesh.
Definition: mesh.h:38
std::vector< Node > nodes
Nodes that constitutes the mesh.
Definition: mesh.h:220
Representation of a mesh, all of its nodes and elements.
Definition: mesh.h:99
float getY()
Definition: mesh.cpp:36
std::string name
Name of the mesh.
Definition: mesh.h:190
float getZ()
Definition: mesh.cpp:37
unsigned int elementCount
Number of elements in the mesh.
Definition: mesh.h:215
int * elements
Elements of the mesh.
Definition: mesh.h:225
float getX()
Definition: mesh.cpp:35
std::string elementName
String encoded element type of the mesh.
Definition: mesh.h:195
const float * getCoords()
Definition: mesh.cpp:34
#define GZ_BUFFER_SIZE
Buffer size for gzread uses.
Definition: utilities.h:26
Node(unsigned int id, const float *coord)
Definition: mesh.cpp:16
int * elementsConnectivity
Connectivity of the elements.
Definition: mesh.h:230
unsigned int nodeCount
Number of nodes which constitutes the mesh.
Definition: mesh.h:210
static size_t maxNodeCount
Biggest number of node encountered in the mesh.
Definition: mesh.h:165
static const std::map< std::string, GiD_ElementType > GiD_ElementTypeEncoding
Map of all recognized GiD_ElementType according to their string encoded value.
Definition: mesh.h:170
GiD_ElementType elementType
Element type of the mesh.
Definition: mesh.h:200
char dataFields[10][40]
Definition: utilities.h:76
unsigned int dimCount
Number of dimensions of the object (2 or 3)
Definition: mesh.h:205