From bfe82265e254ff43b564f0d76f5672c3d92d567c Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Thu, 21 Nov 2019 18:11:01 +0100 Subject: [PATCH] hp::Refinement::predict_error: Detangle assertions. --- source/hp/refinement.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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()] -- 2.39.5