]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fixed bug in clone method of FE_DGQ class for non-equidistant support points.
authorprill <prill@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 31 Oct 2006 10:26:40 +0000 (10:26 +0000)
committerprill <prill@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 31 Oct 2006 10:26:40 +0000 (10:26 +0000)
git-svn-id: https://svn.dealii.org/trunk@14135 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/fe_dgq.cc
deal.II/doc/news/changes.html

index 06a96b2e84ca709499c60fd2afa4ba7c8b612139..3e84e1e4a67c4ef458fe6795dd5121725abac301 100644 (file)
@@ -242,7 +242,18 @@ template <int dim>
 FiniteElement<dim> *
 FE_DGQ<dim>::clone() const
 {
-  return new FE_DGQ<dim>(this->degree);
+                                  // TODO[Prill] : There must be a better way
+                                  // to extract 1D quadrature points from the
+                                  // tensor product FE.
+  
+                                  // Construct a dummy quadrature formula
+                                  // containing the FE's nodes:
+  std::vector<Point<1> > qpoints(this->degree+1);
+  for (unsigned int i=0; i<=this->degree; ++i)
+    qpoints[i] = Point<1>(this->unit_support_points[i][0]);
+  Quadrature<1> pquadrature(qpoints);
+  
+  return new FE_DGQ<dim>(pquadrature);
 }
 
 
index a078cdd55e963d11d409cf30e1c6b217a84f0e22..e041f93bc28e777151c08f26ac5fcc2fe53ed6fa 100644 (file)
@@ -893,6 +893,13 @@ inconvenience this causes.
 
 <ol>
 
+  <li> <p> Fixed: Corrected <code class="member">clone</code> method 
+       of <code class="class">FE_DGQ</code> class for non-equidistant 
+       support points.
+       <br>
+       (F. Prill 2006/10/31)
+       </p>
+
   <li> <p> Improved: The lookup mechanism in <code
        class="class">FETools</code>::<code
        class="member">get_fe_from_name</code> has been changed, so

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.