]> https://gitweb.dealii.org/ - dealii.git/commitdiff
MatrixFree: assert that in hp-mode only a single DoFHandler is used 11246/head
authorPeter Munch <peterrmuench@gmail.com>
Wed, 25 Nov 2020 13:30:14 +0000 (14:30 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Wed, 25 Nov 2020 19:37:35 +0000 (20:37 +0100)
include/deal.II/matrix_free/matrix_free.templates.h

index 01809a8ea98ec3ec510a1fb003902ebbb9bcdf99..98e842cd8b7dd1492f7f4c9b798c93d6ada2793a 100644 (file)
@@ -442,6 +442,26 @@ MatrixFree<dim, Number, VectorizedArrayType>::internal_reinit(
   // determined in @p extract_local_to_global_indices.
   if (additional_data.initialize_mapping == true)
     {
+      if (dof_handler.size() > 1)
+        {
+          // check if all DoHandlers are in the same hp mode; and if hp
+          // capabilities are enabled: check if active_fe_indices of all
+          // DoFHandler are the same.
+          for (unsigned int i = 1; i < dof_handler.size(); ++i)
+            {
+              Assert(dof_handler[0]->has_hp_capabilities() ==
+                       dof_handler[i]->has_hp_capabilities(),
+                     ExcNotImplemented());
+
+              if (dof_handler[0]->has_hp_capabilities())
+                {
+                  Assert(dof_info[0].cell_active_fe_index ==
+                           dof_info[i].cell_active_fe_index,
+                         ExcNotImplemented());
+                }
+            }
+        }
+
       mapping_info.initialize(
         dof_handler[0]->get_triangulation(),
         cell_level_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.