]> https://gitweb.dealii.org/ - dealii.git/commitdiff
FE_BDM: un-hardcode some QProjector properties.
authorDavid Wells <drwells@email.unc.edu>
Tue, 2 Apr 2024 13:24:31 +0000 (09:24 -0400)
committerDavid Wells <drwells@email.unc.edu>
Tue, 2 Apr 2024 13:24:45 +0000 (09:24 -0400)
source/fe/fe_bdm.cc

index 00d60cba06769a2bb59f512ca8156b7682af0d51..d5aa67d62a95b27e505b95727d2bce0ed8399e8f 100644 (file)
@@ -379,21 +379,24 @@ FE_BDM<dim>::initialize_support_points(const unsigned int deg)
 
   // Compute the size of the whole support point set
   const unsigned int npoints =
-    cell_points.size() + GeometryInfo<dim>::faces_per_cell * face_points.size();
+    GeometryInfo<dim>::faces_per_cell * face_points.size() + cell_points.size();
 
   this->generalized_support_points.resize(npoints);
 
   Quadrature<dim> faces =
     QProjector<dim>::project_to_all_faces(this->reference_cell(), face_points);
-  for (unsigned int k = 0;
-       k < face_points.size() * GeometryInfo<dim>::faces_per_cell;
-       ++k)
-    this->generalized_support_points[k] =
-      faces.point(k + QProjector<dim>::DataSetDescriptor::face(
-                        this->reference_cell(),
-                        0,
-                        ReferenceCell::default_combined_face_orientation(),
-                        this->n_dofs_per_face(face_no)));
+
+  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    {
+      const auto offset = QProjector<dim>::DataSetDescriptor::face(
+        this->reference_cell(),
+        f,
+        ReferenceCell::default_combined_face_orientation(),
+        face_points.size());
+      for (unsigned int k = 0; k < face_points.size(); ++k)
+        this->generalized_support_points[face_points.size() * f + k] =
+          faces.point(offset + k);
+    }
 
   // Currently, for backward compatibility, we do not use moments, but
   // point values on faces in 2d. In 3d, this is impossible, since 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.