From: bangerth Date: Tue, 1 Oct 2013 18:49:50 +0000 (+0000) Subject: Improve error message. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3095adf4ac00c15b708bafdb4fdb44fea2e1c62b;p=dealii-svn.git Improve error message. git-svn-id: https://svn.dealii.org/trunk@31059 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/grid/grid_reordering.cc b/deal.II/source/grid/grid_reordering.cc index b5d385272a..9903f8255b 100644 --- a/deal.II/source/grid/grid_reordering.cc +++ b/deal.II/source/grid/grid_reordering.cc @@ -660,7 +660,20 @@ GridReordering<2>::invert_all_cells_of_negative_grid(const std::vector // 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.")); }