From: wolf Date: Thu, 29 Nov 2001 14:08:43 +0000 (+0000) Subject: Check in an assert that breaks the program sometimes. Something is X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7c056adcf45faeca4e3d4778b5f0e18cb6be45e;p=dealii-svn.git 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 --- 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)