Commit 5207b91f authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'fix/facet-gmsh-reader' into 'master'

Fix/facet gmsh reader

See merge request !1698
parents 9b33d41f 9c161fc4
......@@ -95,9 +95,16 @@ public:
if (gridFile.fail())
DUNE_THROW(Dune::InvalidStateException, "Could not open the given .msh file. Make sure it exists");
// read file until we get to the list of nodes
// currently we only support version 2 file format
std::string line;
std::getline(gridFile, line);
if (line.find("$MeshFormat") == std::string::npos)
DUNE_THROW(Dune::InvalidStateException, "Expected $MeshFormat in the first line of the grid file!");
std::getline(gridFile, line);
if (line.find_first_of("2") != 0)
DUNE_THROW(Dune::InvalidStateException, "Currently only Gmsh mesh file format version 2 is supported!");
// read file until we get to the list of nodes
while (line.find("$Nodes") == std::string::npos)
std::getline(gridFile, line);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment