From 4f711819449ba9a8b175281b50ee79888fde3ee1 Mon Sep 17 00:00:00 2001 From: Rene Gassmoeller Date: Sun, 21 Aug 2016 19:19:32 -0600 Subject: [PATCH] Precompute line support points --- include/deal.II/fe/mapping_q_generic.h | 10 ++++++++++ source/fe/mapping_q_generic.cc | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/deal.II/fe/mapping_q_generic.h b/include/deal.II/fe/mapping_q_generic.h index 54010338a6..2d9f749e8e 100644 --- a/include/deal.II/fe/mapping_q_generic.h +++ b/include/deal.II/fe/mapping_q_generic.h @@ -390,6 +390,16 @@ public: */ const unsigned int n_shape_functions; + /* + * The default line support points. Is used in when the shape function + * values are computed. + * + * The number of quadrature points depends on the degree of this + * class, and it matches the number of degrees of freedom of an + * FE_Q<1>(this->degree). + */ + QGaussLobatto<1> line_support_points; + /** * Tensors of covariant transformation at each of the quadrature points. * The matrix stored is the Jacobian * G^{-1}, where G = Jacobian^{t} * diff --git a/source/fe/mapping_q_generic.cc b/source/fe/mapping_q_generic.cc index 1651939d7c..317dc0b5c1 100644 --- a/source/fe/mapping_q_generic.cc +++ b/source/fe/mapping_q_generic.cc @@ -665,7 +665,8 @@ template MappingQGeneric::InternalData::InternalData (const unsigned int polynomial_degree) : polynomial_degree (polynomial_degree), - n_shape_functions (Utilities::fixed_power(polynomial_degree+1)) + n_shape_functions (Utilities::fixed_power(polynomial_degree+1)), + line_support_points (polynomial_degree + 1) {} @@ -862,7 +863,6 @@ compute_shape_function_values (const std::vector > &unit_points) // Construct the tensor product polynomials used as shape functions for the // Qp mapping of cells at the boundary. - const QGaussLobatto<1> line_support_points (polynomial_degree + 1); const TensorProductPolynomials tensor_pols (Polynomials::generate_complete_Lagrange_basis(line_support_points.get_points())); Assert (n_shape_functions==tensor_pols.n(), -- 2.39.5