From 972ce2a806267cb995e4b0cdb2c1cd0984186175 Mon Sep 17 00:00:00 2001 From: prill Date: Tue, 31 Oct 2006 10:26:40 +0000 Subject: [PATCH] Fixed bug in clone method of FE_DGQ class for non-equidistant support points. git-svn-id: https://svn.dealii.org/trunk@14135 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/fe/fe_dgq.cc | 13 ++++++++++++- deal.II/doc/news/changes.html | 7 +++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/deal.II/deal.II/source/fe/fe_dgq.cc b/deal.II/deal.II/source/fe/fe_dgq.cc index 06a96b2e84..3e84e1e4a6 100644 --- a/deal.II/deal.II/source/fe/fe_dgq.cc +++ b/deal.II/deal.II/source/fe/fe_dgq.cc @@ -242,7 +242,18 @@ template FiniteElement * FE_DGQ::clone() const { - return new FE_DGQ(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 > 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(pquadrature); } diff --git a/deal.II/doc/news/changes.html b/deal.II/doc/news/changes.html index a078cdd55e..e041f93bc2 100644 --- a/deal.II/doc/news/changes.html +++ b/deal.II/doc/news/changes.html @@ -893,6 +893,13 @@ inconvenience this causes.
    +
  1. Fixed: Corrected clone method + of FE_DGQ class for non-equidistant + support points. +
    + (F. Prill 2006/10/31) +

    +
  2. Improved: The lookup mechanism in FETools::get_fe_from_name has been changed, so -- 2.39.5