]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
new constructor for arbitrary interpolation points
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 10 Jun 2005 14:30:17 +0000 (14:30 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 10 Jun 2005 14:30:17 +0000 (14:30 +0000)
git-svn-id: https://svn.dealii.org/trunk@10854 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/fe_dgq.cc

index 1a35488344e826d5a60192e34fb0006324e35f1b..9423cc1b2b9b27fd771869fb36f83e3844f30cfb 100644 (file)
@@ -11,6 +11,7 @@
 //
 //---------------------------------------------------------------------------
 
+#include <base/quadrature.h>
 #include <fe/fe_dgq.h>
 #include <fe/fe_tools.h>
 
@@ -257,6 +258,29 @@ FE_DGQ<dim>::FE_DGQ (const unsigned int degree)
 
 
 
+template <int dim>
+FE_DGQ<dim>::FE_DGQ (const Quadrature<1>& points)
+               :
+               FE_Poly<TensorProductPolynomials<dim>, dim> (
+                 TensorProductPolynomials<dim>(Polynomials::Lagrange::generate_complete_basis(points.get_points())),
+                 FiniteElementData<dim>(get_dpo_vector(points.n_quadrature_points-1), 1, points.n_quadrature_points-1),
+                 std::vector<bool>(FiniteElementData<dim>(get_dpo_vector(points.n_quadrature_points-1),1, points.n_quadrature_points-1).dofs_per_cell, true),
+                 std::vector<std::vector<bool> >(FiniteElementData<dim>(
+                   get_dpo_vector(points.n_quadrature_points-1),1, points.n_quadrature_points-1).dofs_per_cell, std::vector<bool>(1,true)))
+{
+  for (unsigned int i=0; i<GeometryInfo<dim>::children_per_cell; ++i)
+    this->prolongation[i].reinit (this->dofs_per_cell,
+                                 this->dofs_per_cell);
+  FETools::compute_embedding_matrices (*this, &this->prolongation[0]);
+  
+                                  // Compute support points, whivh
+                                  // are the tensor product of the
+                                  // Lagrange interpolation points in
+                                  // the constructor.
+  Quadrature<dim> support_quadrature(points);
+  this->unit_support_points = support_quadrature.get_points();
+}
+
 template <int dim>
 std::string
 FE_DGQ<dim>::get_name () const

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.