From e7c056adcf45faeca4e3d4778b5f0e18cb6be45e Mon Sep 17 00:00:00 2001 From: wolf Date: Thu, 29 Nov 2001 14:08:43 +0000 Subject: [PATCH] Check in an assert that breaks the program sometimes. Something is wrong here. git-svn-id: https://svn.dealii.org/trunk@5308 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/grid/grid_reordering.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/deal.II/deal.II/source/grid/grid_reordering.cc b/deal.II/deal.II/source/grid/grid_reordering.cc index 646d67b77e..499acaf235 100644 --- a/deal.II/deal.II/source/grid/grid_reordering.cc +++ b/deal.II/deal.II/source/grid/grid_reordering.cc @@ -1168,7 +1168,8 @@ GridReordering::presort_cells (typename std::vector &cells, unique_copy (new_next_round_cells.begin(), new_next_round_cells.end(), back_inserter(next_round_cells)); }; - Assert (std::find (new_cell_numbers.begin(), new_cell_numbers.end(), invalid_cell_number) + Assert (std::find (new_cell_numbers.begin(), new_cell_numbers.end(), + invalid_cell_number) == new_cell_numbers.end(), ExcInternalError()); @@ -1190,7 +1191,11 @@ GridReordering::presort_cells (typename std::vector &cells, Assert (cells[c].cell_no == c, ExcInternalError()); for (unsigned int n=0; n::faces_per_cell; ++n) - cells[c].neighbors[n] = new_cell_numbers[cells[c].neighbors[n]]; + { + Assert (cells[c].neighbors[n] < new_cell_numbers.size(), + ExcInternalError()); + cells[c].neighbors[n] = new_cell_numbers[cells[c].neighbors[n]]; + }; }; for (typename std::map::iterator i=faces.begin(); i!=faces.end(); ++i) -- 2.39.5