]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace a common exception without argument by something that has a significant amoun...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 27 Feb 2015 03:34:13 +0000 (21:34 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 27 Feb 2015 03:34:13 +0000 (21:34 -0600)
source/grid/tria.cc

index e032b3d127f70248a57073c1402369a96b46c54c..42a4144b14d14e984b3fbdb5b3bb4b2eef55f724 100644 (file)
@@ -986,7 +986,7 @@ namespace internal
      * @ingroup Exceptions
      */
     DeclException3 (ExcInteriorLineCantBeBoundary,
-                    int, int,
+                    int, int, int, int,
                     types::boundary_id,
                     << "The input data for creating a triangulation contained "
                     << "information about a line with indices "
@@ -1016,7 +1016,33 @@ namespace internal
      * Exception
      * @ingroup Exceptions
      */
-    DeclException0 (ExcInteriorQuadCantBeBoundary);
+    DeclException5 (ExcInteriorQuadCantBeBoundary,
+                    int, int, int, int
+                    types::boundary_id,
+                    << "The input data for creating a triangulation contained "
+                    << "information about a quad with indices "
+                    << arg1 << ", " << arg2 << ", " << arg 3 << ", and " << arg4
+                    << "that is supposed to have boundary indicator "
+                    << arg5
+                    << ". However, this is an internal quad not located on the "
+                    << "boundary. You cannot assign a boundary indicator to it."
+                    << std::endl
+                    << std::endl
+                    << "If this happened at a place where you call "
+                    << "Triangulation::create_triangulation() yourself, you need "
+                    << "to check the SubCellData object you pass to this function."
+                    << std::endl
+                    << std::endl
+                    << "If this happened in a place where you are reading a mesh "
+                    << "from a file, then you need to investigate why such a quad "
+                    << "ended up in the input file. A typical case is a geometry "
+                    << "that consisted of multiple parts and for which the mesh "
+                    << "generator program assumes that the interface between "
+                    << "two parts is a boundary when that isn't supposed to be "
+                    << "the case, or where the mesh generator simply assigns "
+                    << "'geometry indicators' to quads at the surface of "
+                    << "a part that are not supposed to be interpreted as "
+                    << "'boundary indicators'.");
     /**
      * Exception
      * @ingroup Exceptions
@@ -2755,7 +2781,11 @@ namespace internal
             // check whether this face is
             // really an exterior one
             AssertThrow (quad->at_boundary(),
-                         ExcInteriorQuadCantBeBoundary());
+                         ExcInteriorQuadCantBeBoundary(quad->vertex(0),
+                                                       quad->vertex(1),
+                                                       quad->vertex(2),
+                                                       quad->vertex(3),
+                                                       boundary_quad->boundary_id));
 
             // and make sure that we don't
             // attempt to reset the

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.