From: Daniel Arndt Date: Sun, 25 Feb 2018 16:26:21 +0000 (+0100) Subject: Move computation of QGaussChebyshev support points into helper namespace X-Git-Tag: v9.0.0-rc1~363^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cfb99763f90bdd57ede8b932fb792f04d642268;p=dealii.git Move computation of QGaussChebyshev support points into helper namespace --- diff --git a/include/deal.II/base/quadrature_lib.h b/include/deal.II/base/quadrature_lib.h index fb373961e1..6576104b63 100644 --- a/include/deal.II/base/quadrature_lib.h +++ b/include/deal.II/base/quadrature_lib.h @@ -503,16 +503,6 @@ class QGaussChebyshev : public Quadrature public: /// Generate a formula with n quadrature points QGaussChebyshev(const unsigned int n); - -private: - /// Computes the points of the quadrature formula. - static std::vector - get_quadrature_points(const unsigned int n); - - /// Computes the weights of the quadrature formula. - static std::vector - get_quadrature_weights(const unsigned int n); - }; diff --git a/source/base/quadrature_lib.cc b/source/base/quadrature_lib.cc index 45351f54b3..d766912061 100644 --- a/source/base/quadrature_lib.cc +++ b/source/base/quadrature_lib.cc @@ -1157,40 +1157,49 @@ QTelles<1>::QTelles ( } } - - -template <> -std::vector -QGaussChebyshev<1>::get_quadrature_points(const unsigned int n) +namespace internal { + namespace QGaussChebyshev + { + /** + * Computes the points of the quadrature formula. + */ + std::vector + get_quadrature_points(const unsigned int n) + { - std::vector points(n); - // n point quadrature: index from 0 to n-1 - for (unsigned short i=0; i points(n); + // n point quadrature: index from 0 to n-1 + for (unsigned short i=0; i -std::vector -QGaussChebyshev<1>::get_quadrature_weights(const unsigned int n) -{ - std::vector weights(n); - - for (unsigned short i=0; i + get_quadrature_weights(const unsigned int n) { - // same weights as on [-1,1] - weights[i] = numbers::PI/double(n); - } - return weights; + std::vector weights(n); + for (unsigned short i=0; i::QGaussChebyshev(const unsigned int n) { Assert(n>0,ExcMessage("Need at least one point for the quadrature rule")); - std::vector p=get_quadrature_points(n); - std::vector w=get_quadrature_weights(n); + std::vector p=internal::QGaussChebyshev::get_quadrature_points(n); + std::vector w=internal::QGaussChebyshev::get_quadrature_weights(n); for (unsigned int i=0; isize(); ++i) {