From 69dd37584eb99654d22b7cc14b455dae3da25a33 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 1 Oct 2013 18:49:50 +0000 Subject: [PATCH] Improve error message. git-svn-id: https://svn.dealii.org/trunk@31059 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/grid/grid_reordering.cc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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.")); } -- 2.39.5