From: Marc Fehling Date: Thu, 21 Nov 2019 17:11:01 +0000 (+0100) Subject: hp::Refinement::predict_error: Detangle assertions. X-Git-Tag: v9.2.0-rc1~815^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfe82265e254ff43b564f0d76f5672c3d92d567c;p=dealii.git hp::Refinement::predict_error: Detangle assertions. --- diff --git a/source/hp/refinement.cc b/source/hp/refinement.cc index c160347b1c..491206ec34 100644 --- a/source/hp/refinement.cc +++ b/source/hp/refinement.cc @@ -317,9 +317,14 @@ namespace hp { if (cell->future_fe_index_set()) // p adaptation { - Assert(!cell->refine_flag_set() && !cell->coarsen_flag_set(), - ExcMessage("Cell has to be either flagged for h or p " - "adaptation, and not for both!")); + Assert(cell->future_fe_index_set() && !cell->refine_flag_set(), + ExcMessage( + "For error prediction, a cell marked for p-adaptation " + "should not also be flagged for h-refinement!")); + Assert(cell->future_fe_index_set() && !cell->coarsen_flag_set(), + ExcMessage( + "For error prediction, a cell marked for p-adaptation " + "should not also be flagged for h-coarsening!")); const int degree_difference = dof_handler.get_fe_collection()[cell->future_fe_index()]