]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Precompute line support points 2997/head
authorRene Gassmoeller <rene.gassmoeller@mailbox.org>
Mon, 22 Aug 2016 01:19:32 +0000 (19:19 -0600)
committerRene Gassmoeller <rene.gassmoeller@mailbox.org>
Mon, 22 Aug 2016 19:39:00 +0000 (13:39 -0600)
include/deal.II/fe/mapping_q_generic.h
source/fe/mapping_q_generic.cc

index 54010338a625ae6d8c6ac16f4eb2776a0b2e458d..2d9f749e8e88340eb1e35a12e400391ecdca3792 100644 (file)
@@ -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} *
index 1651939d7cbbe2782492a0ec62f9327b615eeca9..317dc0b5c197a125111d15150a774f7258e6b683 100644 (file)
@@ -665,7 +665,8 @@ template<int dim, int spacedim>
 MappingQGeneric<dim,spacedim>::InternalData::InternalData (const unsigned int polynomial_degree)
   :
   polynomial_degree (polynomial_degree),
-  n_shape_functions (Utilities::fixed_power<dim>(polynomial_degree+1))
+  n_shape_functions (Utilities::fixed_power<dim>(polynomial_degree+1)),
+  line_support_points (polynomial_degree + 1)
 {}
 
 
@@ -862,7 +863,6 @@ compute_shape_function_values (const std::vector<Point<dim> > &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<dim>
       tensor_pols (Polynomials::generate_complete_Lagrange_basis(line_support_points.get_points()));
       Assert (n_shape_functions==tensor_pols.n(),

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.