35 explicit MshReader(
const std::string &filename);
49 void readMesh(
size_t dim, std::vector<util::Point> *nodes,
50 size_t &element_type,
size_t &num_elems,
51 std::vector<size_t> *enc, std::vector<std::vector<size_t>> *nec,
52 std::vector<double> *volumes,
bool is_fd =
false);
59 void readNodes(std::vector<util::Point> *nodes);
69 void readCells(
size_t dim,
size_t &element_type,
70 size_t &num_elems, std::vector<size_t> *enc,
71 std::vector<std::vector<size_t>> *nec);
79 bool readPointData(
const std::string &name, std::vector<util::Point> *data);
87 bool readPointData(
const std::string &name, std::vector<double> *data);
A class to read Gmsh (msh) mesh files.
std::string d_filename
filename
void readMesh(size_t dim, std::vector< util::Point > *nodes, size_t &element_type, size_t &num_elems, std::vector< size_t > *enc, std::vector< std::vector< size_t > > *nec, std::vector< double > *volumes, bool is_fd=false)
Reads mesh data into node file and element file.
void readCells(size_t dim, size_t &element_type, size_t &num_elems, std::vector< size_t > *enc, std::vector< std::vector< size_t > > *nec)
Reads cell data, i.e. element-node connectivity and node-element connectivity.
bool readPointData(const std::string &name, std::vector< util::Point > *data)
reads point data from .vtu file
void close()
Close the file.
void readNodes(std::vector< util::Point > *nodes)
Reads nodal position.
std::ifstream d_file
vtk/vtu file
Collection of methods and database related to reading and writing.