From 851449e8e8a0a04eb5286f73e68c3ad20d2357fd Mon Sep 17 00:00:00 2001 From: David Wells Date: Tue, 15 Oct 2024 14:39:08 -0400 Subject: [PATCH] FE_Q_Base: cleanup. --- source/fe/fe_q_base.cc | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/source/fe/fe_q_base.cc b/source/fe/fe_q_base.cc index ab9e3f4129..c006cd80e1 100644 --- a/source/fe/fe_q_base.cc +++ b/source/fe/fe_q_base.cc @@ -161,21 +161,16 @@ struct FE_Q_Base::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::child_to_cell_coordinates( - Point(i * step), 0)); - // subface 1 - for (unsigned int i = 1; i <= n; ++i) - constraint_points.push_back( - GeometryInfo::child_to_cell_coordinates( - Point(i * step), 1)); - } + // subface 0 + for (unsigned int i = 1; i < q_deg; ++i) + constraint_points.push_back( + GeometryInfo::child_to_cell_coordinates( + Point(i / double(q_deg)), 0)); + // subface 1 + for (unsigned int i = 1; i < q_deg; ++i) + constraint_points.push_back( + GeometryInfo::child_to_cell_coordinates( + Point(i / double(q_deg)), 1)); // Now construct relation between destination (child) and source (mother) // dofs. -- 2.39.5