From: bangerth Date: Fri, 14 Sep 2012 11:08:57 +0000 (+0000) Subject: Explicitly say so if a gmsh file being read contains triangles or tetrahedra. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5459fa026e4b32f2909d8cc5bdbeb1fcaf373c87;p=dealii-svn.git Explicitly say so if a gmsh file being read contains triangles or tetrahedra. git-svn-id: https://svn.dealii.org/trunk@26375 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/grid/grid_in.cc b/deal.II/source/grid/grid_in.cc index 25c7698101..6fcd927fd9 100644 --- a/deal.II/source/grid/grid_in.cc +++ b/deal.II/source/grid/grid_in.cc @@ -1116,8 +1116,24 @@ void GridIn::read_msh (std::istream &in) } } else - // cannot read this - AssertThrow (false, ExcGmshUnsupportedGeometry(cell_type)); + // cannot read this, so throw + // an exception. treat + // triangles and tetrahedra + // specially since this + // deserves a more explicit + // error message + { + AssertThrow (cell_type != 2, + ExcMessage("Found triangles while reading a file " + "in gmsh format. deal.II does not " + "support triangles")); + AssertThrow (cell_type != 11, + ExcMessage("Found tetrahedra while reading a file " + "in gmsh format. deal.II does not " + "support tetrahedra")); + + AssertThrow (false, ExcGmshUnsupportedGeometry(cell_type)); + } }; // Assert we reached the end of the block