]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Explicitly say so if a gmsh file being read contains triangles or tetrahedra.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 14 Sep 2012 11:08:57 +0000 (11:08 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 14 Sep 2012 11:08:57 +0000 (11:08 +0000)
git-svn-id: https://svn.dealii.org/trunk@26375 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/grid/grid_in.cc

index 25c769810166bd5e51661f3e2d1fa09c705ff05b..6fcd927fd90c329a52a6155f7c599ff0e190b240 100644 (file)
@@ -1116,8 +1116,24 @@ void GridIn<dim, spacedim>::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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.