From 198e5bd9d837e451d8b72ac78af822ec2f1a550c Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 9 Sep 2017 21:05:10 -0400 Subject: [PATCH] Move a private static member into the source file. --- include/deal.II/base/quadrature.h | 7 ------ source/base/quadrature.cc | 37 ++++++++++++++++++------------- 2 files changed, 21 insertions(+), 23 deletions(-) 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 -- 2.39.5