]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Move a private static member into the source file.
authorDavid Wells <wellsd2@rpi.edu>
Sun, 10 Sep 2017 01:05:10 +0000 (21:05 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Sat, 28 Oct 2017 18:17:05 +0000 (14:17 -0400)
include/deal.II/base/quadrature.h
source/base/quadrature.cc

index 39378c87a7e846d99354005e533df3a65195257e..7d014a571150682558dcdc64372c801a6681e5be 100644 (file)
@@ -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);
 };
 
 
index 898b8fd6de497b2d1c7ab0c3c3c40890ec67f906..3f7474ef17d8c27b0817e0e60cd4f40ba83bef89 100644 (file)
@@ -1600,25 +1600,30 @@ QProjector<dim>::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<base_quadrature.size(); ++i)
+  namespace QIterated
+  {
+    namespace
     {
-      if (base_quadrature.point(i) == Point<1>(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<base_quadrature.size(); ++i)
+          {
+            if (base_quadrature.point(i) == Point<1>(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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.