From f527febb282954e70b819ada92796e8651cc1571 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Thu, 16 Jun 2022 12:58:17 +0200 Subject: [PATCH] DoFInfo::compute_tight_partitioners for hp --- source/matrix_free/dof_info.cc | 35 +++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/source/matrix_free/dof_info.cc b/source/matrix_free/dof_info.cc index ac7e721ff1..482614408e 100644 --- a/source/matrix_free/dof_info.cc +++ b/source/matrix_free/dof_info.cc @@ -994,16 +994,19 @@ namespace internal const std::function &)> &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 &)> &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; -- 2.39.5