From: Wolfgang Bangerth Date: Fri, 19 Jun 2015 16:15:28 +0000 (-0500) Subject: Add two assertions we had apparently forgotten previously. X-Git-Tag: v8.3.0-rc1~102^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5aede4a4acc72b00a0f7301704fc99da494b386c;p=dealii.git Add two assertions we had apparently forgotten previously. The functions refining meshes in parallel get vectors with as many elements as there are active cells in the triangulation on this processor. Verify that this so. --- diff --git a/source/distributed/grid_refinement.cc b/source/distributed/grid_refinement.cc index 1ee88da7df..714f255962 100644 --- a/source/distributed/grid_refinement.cc +++ b/source/distributed/grid_refinement.cc @@ -547,6 +547,8 @@ namespace parallel const double bottom_fraction_of_cells, const unsigned int max_n_cells) { + Assert (criteria.size() == tria.n_active_cells(), + ExcDimensionMismatch (criteria.size(), tria.n_active_cells())); Assert ((top_fraction_of_cells>=0) && (top_fraction_of_cells<=1), dealii::GridRefinement::ExcInvalidParameterValue()); Assert ((bottom_fraction_of_cells>=0) && (bottom_fraction_of_cells<=1), @@ -664,6 +666,8 @@ namespace parallel const double top_fraction_of_error, const double bottom_fraction_of_error) { + Assert (criteria.size() == tria.n_active_cells(), + ExcDimensionMismatch (criteria.size(), tria.n_active_cells())); Assert ((top_fraction_of_error>=0) && (top_fraction_of_error<=1), dealii::GridRefinement::ExcInvalidParameterValue()); Assert ((bottom_fraction_of_error>=0) && (bottom_fraction_of_error<=1),