]> https://gitweb.dealii.org/ - dealii.git/commitdiff
DoFInfo::compute_tight_partitioners for hp 13987/head
authorPeter Munch <peterrmuench@gmail.com>
Thu, 16 Jun 2022 10:58:17 +0000 (12:58 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Thu, 16 Jun 2022 10:58:17 +0000 (12:58 +0200)
source/matrix_free/dof_info.cc

index ac7e721ff1572cee2121d52c9e211fcc21ca8a33..482614408ef665e86aa14d62c4b7bcfb2cd87c37 100644 (file)
@@ -994,16 +994,19 @@ namespace internal
           const std::function<void(
             const std::function<void(
               const unsigned int, const unsigned int, const bool)> &)> &loop) {
-          bool all_nodal_and_tensorial = true;
-          for (unsigned int c = 0; c < n_base_elements; ++c)
-            {
-              const auto &si =
-                shape_info(global_base_element_offset + c, 0).data.front();
-              if (!si.nodal_at_cell_boundaries ||
-                  (si.element_type ==
-                   MatrixFreeFunctions::ElementType::tensor_none))
-                all_nodal_and_tensorial = false;
-            }
+          bool all_nodal_and_tensorial = shape_info.size(1) == 1;
+
+          if (all_nodal_and_tensorial)
+            for (unsigned int c = 0; c < n_base_elements; ++c)
+              {
+                const auto &si =
+                  shape_info(global_base_element_offset + c, 0).data.front();
+                if (!si.nodal_at_cell_boundaries ||
+                    (si.element_type ==
+                     MatrixFreeFunctions::ElementType::tensor_none))
+                  all_nodal_and_tensorial = false;
+              }
+
           if (all_nodal_and_tensorial == false)
             vector_partitioner_values = vector_partitioner;
           else
@@ -1082,11 +1085,13 @@ namespace internal
           const std::function<void(
             const std::function<void(
               const unsigned int, const unsigned int, const bool)> &)> &loop) {
-          bool all_hermite = true;
-          for (unsigned int c = 0; c < n_base_elements; ++c)
-            if (shape_info(global_base_element_offset + c, 0).element_type !=
-                MatrixFreeFunctions::tensor_symmetric_hermite)
-              all_hermite = false;
+          bool all_hermite = shape_info.size(1) == 1;
+
+          if (all_hermite)
+            for (unsigned int c = 0; c < n_base_elements; ++c)
+              if (shape_info(global_base_element_offset + c, 0).element_type !=
+                  MatrixFreeFunctions::tensor_symmetric_hermite)
+                all_hermite = false;
           if (all_hermite == false ||
               vector_partitoner_values.get() == vector_partitioner.get())
             vector_partitioner_gradients = vector_partitioner;

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.