]> https://gitweb.dealii.org/ - dealii.git/commitdiff
hp::Refinement::predict_error: Detangle assertions. 9067/head
authorMarc Fehling <marc.fehling@gmx.net>
Thu, 21 Nov 2019 17:11:01 +0000 (18:11 +0100)
committerMarc Fehling <marc.fehling@gmx.net>
Tue, 3 Dec 2019 00:02:30 +0000 (01:02 +0100)
source/hp/refinement.cc

index c160347b1ce7167698fdbe336e8066fcc2089e3e..491206ec341bde4045511496a3f73fcbddf2e66e 100644 (file)
@@ -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()]

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.