]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix interface mismatch in ScratchData in hp mode. 15105/head
authorMarc Fehling <mafehling.git@gmail.com>
Wed, 5 Apr 2023 22:31:49 +0000 (16:31 -0600)
committerMarc Fehling <mafehling.git@gmail.com>
Mon, 17 Apr 2023 18:09:40 +0000 (12:09 -0600)
source/meshworker/scratch_data.cc

index fedca84bc440883fc560e2fd66896cb4cd6ccba2..8bb1d6b51263ae7c2a2eac77d3136d409a0cf059 100644 (file)
@@ -317,9 +317,15 @@ namespace MeshWorker
         // then we defer to the dominance of one FE over another. This should
         // ensure that the optimal integration order and mapping order are
         // selected for this situation.
-        const unsigned int dominated_fe_index =
-          fe_collection->find_dominated_fe(
-            {cell->active_fe_index(), neighbor_cell->active_fe_index()});
+        unsigned int dominated_fe_index = fe_collection->find_dominated_fe(
+          {cell->active_fe_index(), neighbor_cell->active_fe_index()});
+
+        // TODO: find_dominated_fe returns invalid_fe_index when no dominated FE
+        // has been found. We want to pass this value to FEFaceValues, but it
+        // expects an invalid_unsigned_int in this case. We need to match the
+        // interfaces in the future.
+        if (dominated_fe_index == numbers::invalid_fe_index)
+          dominated_fe_index = numbers::invalid_unsigned_int;
 
         hp_fe_face_values->reinit(cell,
                                   face_no,

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.