]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Improve error message.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 1 Oct 2013 18:49:50 +0000 (18:49 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 1 Oct 2013 18:49:50 +0000 (18:49 +0000)
git-svn-id: https://svn.dealii.org/trunk@31059 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/grid/grid_reordering.cc

index b5d385272a99f63ac9b36a5d5b8873f352fd8a4f..9903f8255b1a4ca73d03f9e00b908bb5872510de 100644 (file)
@@ -660,7 +660,20 @@ GridReordering<2>::invert_all_cells_of_negative_grid(const std::vector<Point<2>
   // might work also on single cells, 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(std::string("This class assumes that either all cells have positive "
+                                     "volume, or that all cells have been specified in an "
+                                     "inverted vertex order so that their volume is negative. "
+                                     "(In the latter case, this class automatically inverts "
+                                     "every cell.) However, the mesh you have specified "
+                                     "appears to have both cells with positive and cells with "
+                                     "negative volume. You need to check your mesh which "
+                                     "cells these are and how they got there.\n"
+                                     "As a hint, of the total ")
+                         + Utilities::int_to_string (cells.size())
+                         + " cells in the mesh, "
+                         + Utilities::int_to_string (n_negative_cells)
+                         + " appear to have a negative volume."));
 }
 
 

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.