From: kronbichler Date: Thu, 12 Nov 2009 23:16:40 +0000 (+0000) Subject: Move Quadrature::get_points() ad Quadrature::get_weights() functions to .h-file.... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=797a10cbaa09b31f42180bbb0b88f4a7b8654454;p=dealii-svn.git Move Quadrature::get_points() ad Quadrature::get_weights() functions to .h-file. This resolves a linker problem. git-svn-id: https://svn.dealii.org/trunk@20105 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/quadrature.h b/deal.II/base/include/base/quadrature.h index d9e944abeb..5cd81bd057 100644 --- a/deal.II/base/include/base/quadrature.h +++ b/deal.II/base/include/base/quadrature.h @@ -46,7 +46,7 @@ DEAL_II_NAMESPACE_OPEN * dimension zero contains no information. The main purpose of these * formulæ is their use in QProjector, which will create a useful * formula of dimension one out of them. - * + * *

Mathematical background

* * For each quadrature formula we denote by m, the maximal @@ -89,7 +89,7 @@ class Quadrature : public Subscriptor * then be a face quadrature. */ typedef Quadrature SubQuadrature; - + /** * @deprecated Use size() * instead. @@ -137,7 +137,7 @@ class Quadrature : public Subscriptor */ Quadrature (const SubQuadrature &, const Quadrature<1> &); - + /** * Build this quadrature formula * as the dim-fold @@ -165,7 +165,7 @@ class Quadrature : public Subscriptor * Copy constructor. */ Quadrature (const Quadrature &q); - + /** * Construct a quadrature formula * from given vectors of @@ -210,7 +210,7 @@ class Quadrature : public Subscriptor * size. */ Quadrature& operator = (const Quadrature&); - + /** * Virtual destructor. */ @@ -220,7 +220,7 @@ class Quadrature : public Subscriptor * Number of quadrature points. */ unsigned int size () const; - + /** * Return the ith quadrature * point. @@ -233,7 +233,7 @@ class Quadrature : public Subscriptor * points. */ const std::vector > & get_points () const; - + /** * Return the weight of the ith * quadrature point. @@ -294,14 +294,14 @@ class QAnisotropic : public Quadrature * quadrature rule. */ QAnisotropic(const Quadrature<1>& qx); - + /** * Constructor for a * two-dimensional formula. */ QAnisotropic(const Quadrature<1>& qx, const Quadrature<1>& qy); - + /** * Constructor for a * three-dimensional formula. @@ -405,6 +405,28 @@ Quadrature::weight (const unsigned int i) const +template +inline +const std::vector > & +Quadrature::get_points () const +{ + Assert (dim > 0, ExcInternalError()); + return quadrature_points; +} + + + +template +inline +const std::vector & +Quadrature::get_weights () const +{ + return weights; +} + + + + /* -------------- declaration of explicit specializations ------------- */ @@ -425,9 +447,6 @@ Quadrature<1>::Quadrature (const Quadrature<0> &, template <> Quadrature<1>::Quadrature (const Quadrature<0> &); -template <> -const std::vector > & Quadrature<0>::get_points () const; - #endif // DOXYGEN DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/base/source/quadrature.cc b/deal.II/base/source/quadrature.cc index 80d46e8449..5e104b9650 100644 --- a/deal.II/base/source/quadrature.cc +++ b/deal.II/base/source/quadrature.cc @@ -277,34 +277,6 @@ Quadrature::~Quadrature () -template <> -const std::vector > & -Quadrature<0>::get_points () const -{ - Assert (false, ExcInternalError()); - return quadrature_points; -} - - - -template -const std::vector > & -Quadrature::get_points () const -{ - return quadrature_points; -} - - - -template -const std::vector & -Quadrature::get_weights () const -{ - return weights; -} - - - template unsigned int Quadrature::memory_consumption () const