From 5f815e5a8d8474277564816a55f5ef05452fc298 Mon Sep 17 00:00:00 2001 From: Winnifried Wollner Date: Wed, 30 Oct 2019 09:38:40 +0100 Subject: [PATCH] Fixed fe dimension in VectorTools::internals::compute_edge_projection_l2 --- include/deal.II/numerics/vector_tools.templates.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index c95d4b7b7e..26ba588d7a 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -5366,9 +5366,6 @@ namespace VectorTools // Initialize the required objects. const FEValues &fe_values = hp_fe_values.get_present_fe_values(); - // Store degree as fe.degree-1 - // For nedelec elements FE_Nedelec (0) returns fe.degree = 1. - const unsigned int degree = fe.degree - 1; const std::vector> &quadrature_points = fe_values.get_quadrature_points(); @@ -5412,6 +5409,11 @@ namespace VectorTools base_indices.second = (first_vector_component - fe_index_old) / fe.base_element(i).n_components(); } + // Store degree as fe.degree-1 + // For nedelec elements FE_Nedelec (0) returns fe.degree = 1. + // For FESystem get the degree from the base_element + // indicated by the first_vector_component + const unsigned int degree = fe.base_element(base_indices.first).degree - 1; // Find DoFs we want to constrain: // There are fe.dofs_per_line DoFs associated with the -- 2.39.5