From 5459fa026e4b32f2909d8cc5bdbeb1fcaf373c87 Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 14 Sep 2012 11:08:57 +0000 Subject: [PATCH] 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 --- deal.II/source/grid/grid_in.cc | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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 -- 2.39.5