]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve an error message. 2835/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 15 Jul 2016 16:24:21 +0000 (11:24 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 15 Jul 2016 16:24:21 +0000 (11:24 -0500)
source/grid/grid_reordering.cc

index aee656654f0c089effb4d8799bed55cf8a853e65..95b9da28c79e3472d228615d831cccd443559507 100644 (file)
@@ -1704,7 +1704,25 @@ GridReordering<3>::invert_all_cells_of_negative_grid(
   // grids with both kind of cells
   // are very likely to be
   // broken. Check for this here.
-  AssertThrow(n_negative_cells==0 || n_negative_cells==cells.size(), ExcInternalError());
+  AssertThrow(n_negative_cells==0 || n_negative_cells==cells.size(),
+              ExcMessage("While sorting the cells that will be passed for "
+                         "creating a Triangulation object, deal.II found that "
+                         "some but not all cells have a negative volume. (If "
+                         "all cells had a negative volume, they would simply "
+                         "all have been inverted.) This usually happens in "
+                         "hand-generated meshes if one accidentally uses an "
+                         "incorrect convention for ordering the vertices in "
+                         "one or more cells; in that case, you may want to "
+                         "double check that you specified the vertex indices "
+                         "in their correct order. If you are reading a mesh "
+                         "that was created by a mesh generator, then this "
+                         "exception indicates that some of the cells created "
+                         "are so badly distorted that their volume becomes "
+                         "negative; this commonly occurs at complex geometric "
+                         "features, and you may see if the problem can be "
+                         "fixed by playing with the parameters that control "
+                         "mesh properties in your mesh generator, such as "
+                         "the number of cells, the mesh density, etc."));
 }
 
 

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.