]> https://gitweb.dealii.org/ - dealii.git/commitdiff
FE_Q_Base: cleanup.
authorDavid Wells <drwells@email.unc.edu>
Tue, 15 Oct 2024 18:39:08 +0000 (14:39 -0400)
committerDavid Wells <drwells@email.unc.edu>
Tue, 15 Oct 2024 19:38:42 +0000 (15:38 -0400)
source/fe/fe_q_base.cc

index ab9e3f41296310a3a9e4a73219222bf6967a9ab9..c006cd80e169ca8451081897aa288420ad823cf7 100644 (file)
@@ -161,21 +161,16 @@ struct FE_Q_Base<xdim, xspacedim>::Implementation
     // Add midpoint
     constraint_points.emplace_back(0.5);
 
-    if (q_deg > 1)
-      {
-        const unsigned int n    = q_deg - 1;
-        const double       step = 1. / q_deg;
-        // subface 0
-        for (unsigned int i = 1; i <= n; ++i)
-          constraint_points.push_back(
-            GeometryInfo<dim - 1>::child_to_cell_coordinates(
-              Point<dim - 1>(i * step), 0));
-        // subface 1
-        for (unsigned int i = 1; i <= n; ++i)
-          constraint_points.push_back(
-            GeometryInfo<dim - 1>::child_to_cell_coordinates(
-              Point<dim - 1>(i * step), 1));
-      }
+    // subface 0
+    for (unsigned int i = 1; i < q_deg; ++i)
+      constraint_points.push_back(
+        GeometryInfo<dim - 1>::child_to_cell_coordinates(
+          Point<dim - 1>(i / double(q_deg)), 0));
+    // subface 1
+    for (unsigned int i = 1; i < q_deg; ++i)
+      constraint_points.push_back(
+        GeometryInfo<dim - 1>::child_to_cell_coordinates(
+          Point<dim - 1>(i / double(q_deg)), 1));
 
     // Now construct relation between destination (child) and source (mother)
     // dofs.

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.