From: David Wells Date: Sun, 10 Sep 2017 01:05:10 +0000 (-0400) Subject: Move a private static member into the source file. X-Git-Tag: v9.0.0-rc1~854^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=198e5bd9d837e451d8b72ac78af822ec2f1a550c;p=dealii.git Move a private static member into the source file. --- diff --git a/include/deal.II/base/quadrature.h b/include/deal.II/base/quadrature.h index 39378c87a7..7d014a5711 100644 --- a/include/deal.II/base/quadrature.h +++ b/include/deal.II/base/quadrature.h @@ -351,13 +351,6 @@ public: DeclExceptionMsg (ExcInvalidQuadratureFormula, "The quadrature formula you provided cannot be used " "as the basis for iteration."); -private: - /** - * Check whether the given quadrature formula has quadrature points at the - * left and right end points of the interval. - */ - static bool - uses_both_endpoints (const Quadrature<1> &base_quadrature); }; diff --git a/source/base/quadrature.cc b/source/base/quadrature.cc index 898b8fd6de..3f7474ef17 100644 --- a/source/base/quadrature.cc +++ b/source/base/quadrature.cc @@ -1600,25 +1600,30 @@ QProjector::project_to_subface(const SubQuadrature &quadrature, // ------------------------------------------------------------ // - -template <> -bool -QIterated<1>::uses_both_endpoints (const Quadrature<1> &base_quadrature) +namespace internal { - bool at_left = false, - at_right = false; - for (unsigned int i=0; i(0.0)) - at_left = true; - if (base_quadrature.point(i) == Point<1>(1.0)) - at_right = true; - }; + bool uses_both_endpoints(const Quadrature<1> &base_quadrature) + { + bool at_left = false, + at_right = false; + for (unsigned int i = 0; i(0.0)) + at_left = true; + if (base_quadrature.point(i) == Point<1>(1.0)) + at_right = true; + } - return (at_left && at_right); + return (at_left && at_right); + } + } + } } - // template <> // void // QIterated<1>::fill(Quadrature<1>& dst, @@ -1738,7 +1743,7 @@ template <> QIterated<1>::QIterated (const Quadrature<1> &base_quadrature, const unsigned int n_copies) : - Quadrature<1> (uses_both_endpoints(base_quadrature) ? + Quadrature<1> (internal::QIterated::uses_both_endpoints(base_quadrature) ? (base_quadrature.size()-1) * n_copies + 1 : base_quadrature.size() * n_copies) { @@ -1746,7 +1751,7 @@ QIterated<1>::QIterated (const Quadrature<1> &base_quadrature, Assert (base_quadrature.size() > 0, ExcNotInitialized()); Assert (n_copies > 0, ExcZero()); - if (!uses_both_endpoints(base_quadrature)) + if (!internal::QIterated::uses_both_endpoints(base_quadrature)) // we don't have to skip some // points in order to get a // reasonable quadrature formula