]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixed fe dimension in VectorTools::internals::compute_edge_projection_l2
authorWinnifried Wollner <wollner@mathematik.tu-darmstadt.de>
Wed, 30 Oct 2019 08:38:40 +0000 (09:38 +0100)
committerWinnifried Wollner <wollner@mathematik.tu-darmstadt.de>
Wed, 30 Oct 2019 08:38:40 +0000 (09:38 +0100)
include/deal.II/numerics/vector_tools.templates.h

index c95d4b7b7ea8bd02ebbafc3115b00a5fa0e7b970..26ba588d7ae379ae34edabf65b336b1ef7cb80e6 100644 (file)
@@ -5366,9 +5366,6 @@ namespace VectorTools
 
       // Initialize the required objects.
       const FEValues<dim> &fe_values = hp_fe_values.get_present_fe_values();
-      // Store degree as fe.degree-1
-      // For nedelec elements FE_Nedelec<dim> (0) returns fe.degree = 1.
-      const unsigned int degree = fe.degree - 1;
 
       const std::vector<Point<dim>> &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<dim> (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

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.