37 MSHParser(std::string fileName, std::vector<Element*>& elements, std::vector<Node>& nodes);
52 void load_msh(std::ifstream&file, std::vector<Element*>& elements, std::vector<Node>& nodes);
76 bool readElements(std::ifstream& in, std::vector<Element*> *elements, std::vector<Node>& nodes);
87 bool readNodes(std::ifstream& in, std::vector<Node> *nodes);
95 void readInt(std::ifstream& in,
int *number);
103 void readDouble(std::ifstream& in,
double* number);
void createThreeNodeTriangleElement(std::ifstream &in, std::vector< Element * > *elements, int type, std::vector< Node > &nodes)
Creates a three-node triangle and appends it to the element list.
Definition: MSHParser.cpp:76
bool readNodes(std::ifstream &in, std::vector< Node > *nodes)
Reads the nodes from the .msh file.
Definition: MSHParser.cpp:252
static const int THREE_NODED_TRIANGLE
Integer for selecting element type T3based on the .msh format.
Definition: MSHParser.h:21
static const int FOUR_NODED_QUAD
Integer for selecting element type Q4 based on the .msh format.
Definition: MSHParser.h:23
bool readElements(std::ifstream &in, std::vector< Element * > *elements, std::vector< Node > &nodes)
Reads the elements from .msh file.
Definition: MSHParser.cpp:277
static const int SIX_NODED_TRIANGLE
Integer for selecting element type T6 based on the .msh format.
Definition: MSHParser.h:22
void createFourNodeQuadElement(std::ifstream &in, std::vector< Element * > *elements, int type, std::vector< Node > &nodes)
Creates a four-node quadrilateral element and appends it to the element list.
Definition: MSHParser.cpp:157
static const int NINE_NODED_QUAD
Integer for selecting element type Q9 based on the .msh format.
Definition: MSHParser.h:24
Interprets massive meshes structured in the ".msh" format.
Definition: MSHParser.h:17
MSHParser(std::string fileName, std::vector< Element * > &elements, std::vector< Node > &nodes)
Constructor.
Definition: MSHParser.cpp:7
void readInt(std::ifstream &in, int *number)
Assigns an integer value from the .msh file to the number pointer.
Definition: MSHParser.cpp:58
void createNineNodeQuadElement(std::ifstream &in, std::vector< Element * > *elements, int type, std::vector< Node > &nodes)
Creates a nine-node quadrilateral element and appends it to the element list.
Definition: MSHParser.cpp:195
void createSixNodeTriangleElement(std::ifstream &in, std::vector< Element * > *elements, int type, std::vector< Node > &nodes)
Creates a six-node triangle and appends it to the element list.
Definition: MSHParser.cpp:118
std::string line
Data on line in current position in file.
Definition: MSHParser.h:41
void load_msh(std::ifstream &file, std::vector< Element * > &elements, std::vector< Node > &nodes)
Loads the .msh data into the elements and nodes vectors.
Definition: MSHParser.cpp:21
void readDouble(std::ifstream &in, double *number)
Assigns a double value from the .msh file to the number pointer.
Definition: MSHParser.cpp:64
bool filePosEqualsLine(std::ifstream &line, std::string string)
Verifies that the line from the file matches with .msh format version.
Definition: MSHParser.cpp:70
bool readMeshFormat(std::ifstream &in, double *version)
Reads the mesh format.
Definition: MSHParser.cpp:235