31 LineParser(std::string fileName, std::vector<LineElement*>& elements, std::vector<Node>& nodes);
41 void load_msh(std::ifstream&, std::vector<LineElement*>& elements, std::vector<Node>& nodes);
51 bool readElements(std::ifstream&, std::vector<LineElement*> *, std::vector<Node>& nodes);
52 bool readNodes(std::ifstream& in, std::vector<Node> *nodes);
53 void readInt(std::ifstream& in,
int *number);
54 void readDouble(std::ifstream& in,
double* number);
56 void createTwoNodeLineElement(std::ifstream& in, std::vector<LineElement*> *elements,
int type, std::vector<Node>& nodes);
bool filePosEqualsLine(std::ifstream &, std::string)
Verifies that the line from the file matches with .msh format version.
Definition: LineParser.cpp:75
LineParser(std::string fileName, std::vector< LineElement * > &elements, std::vector< Node > &nodes)
Constructor.
Definition: LineParser.cpp:12
void readDouble(std::ifstream &in, double *number)
Assigns a double value from the .msh file to the number argument.
Definition: LineParser.cpp:69
static const int TWO_NODED_LINE
Integer for selecting element type based on the .msh format.
Definition: LineParser.h:18
bool readMeshFormat(std::ifstream &, double *)
Verifies the mesh format of the file.
Definition: LineParser.cpp:161
void createThreeNodeLineElement(std::ifstream &in, std::vector< LineElement * > *elements, int type, std::vector< Node > &nodes)
Creates a six-node triangle and appends it to the element list.
Definition: LineParser.cpp:126
Parses .msh file.
Definition: LineParser.h:12
void createTwoNodeLineElement(std::ifstream &in, std::vector< LineElement * > *elements, int type, std::vector< Node > &nodes)
Creates a three-node triangle and appends it to the element list.
Definition: LineParser.cpp:81
std::string line
Data on line in current position in file.
Definition: LineParser.h:33
void load_msh(std::ifstream &, std::vector< LineElement * > &elements, std::vector< Node > &nodes)
Loads the .msh data into the elements and nodes vectors.
Definition: LineParser.cpp:29
void readInt(std::ifstream &in, int *number)
Assigns an integer value from the .msh file to the number argument.
Definition: LineParser.cpp:64
bool readNodes(std::ifstream &in, std::vector< Node > *nodes)
Reads the nodes from the .msh file.
Definition: LineParser.cpp:178
bool readElements(std::ifstream &, std::vector< LineElement * > *, std::vector< Node > &nodes)
Reads the elements from .msh file.
Definition: LineParser.cpp:202
static const int THREE_NODED_LINE
Integer for selecting element type based on the .msh format.
Definition: LineParser.h:19