]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Reflow some comments.
authorDavid Wells <drwells@email.unc.edu>
Sun, 20 Sep 2020 17:19:42 +0000 (13:19 -0400)
committerDavid Wells <drwells@email.unc.edu>
Mon, 21 Sep 2020 14:21:40 +0000 (10:21 -0400)
source/base/quadrature.cc

index 52825656d51c8624edfada4882b3d16d509eedf9..023dc56dfb9d08b111b20dfc498833e57fe11bdb 100644 (file)
@@ -136,9 +136,8 @@ Quadrature<dim>::Quadrature(const SubQuadrature &q1, const Quadrature<1> &q2)
   for (unsigned int i2 = 0; i2 < q2.size(); ++i2)
     for (unsigned int i1 = 0; i1 < q1.size(); ++i1)
       {
-        // compose coordinates of
-        // new quadrature point by tensor
-        // product in the last component
+        // compose coordinates of new quadrature point by tensor product in the
+        // last component
         for (unsigned int d = 0; d < dim - 1; ++d)
           quadrature_points[present_index](d) = q1.point(i1)(d);
         quadrature_points[present_index](dim - 1) = q2.point(i2)(0);
@@ -154,9 +153,8 @@ Quadrature<dim>::Quadrature(const SubQuadrature &q1, const Quadrature<1> &q2)
       double sum = 0;
       for (unsigned int i = 0; i < size(); ++i)
         sum += weights[i];
-      // we cannot guarantee the sum of weights
-      // to be exactly one, but it should be
-      // near that.
+      // we cannot guarantee the sum of weights to be exactly one, but it should
+      // be near that.
       Assert((sum > 0.999999) && (sum < 1.000001), ExcInternalError());
     }
 #endif
@@ -181,9 +179,8 @@ Quadrature<1>::Quadrature(const SubQuadrature &, const Quadrature<1> &q2)
   unsigned int present_index = 0;
   for (unsigned int i2 = 0; i2 < q2.size(); ++i2)
     {
-      // compose coordinates of
-      // new quadrature point by tensor
-      // product in the last component
+      // compose coordinates of new quadrature point by tensor product in the
+      // last component
       quadrature_points[present_index](0) = q2.point(i2)(0);
 
       weights[present_index] = q2.weight(i2);
@@ -197,9 +194,8 @@ Quadrature<1>::Quadrature(const SubQuadrature &, const Quadrature<1> &q2)
       double sum = 0;
       for (unsigned int i = 0; i < size(); ++i)
         sum += weights[i];
-      // we cannot guarantee the sum of weights
-      // to be exactly one, but it should be
-      // near that.
+      // we cannot guarantee the sum of weights to be exactly one, but it should
+      // be near that.
       Assert((sum > 0.999999) && (sum < 1.000001), ExcInternalError());
     }
 #  endif
@@ -211,7 +207,7 @@ template <>
 Quadrature<0>::Quadrature(const Quadrature<1> &)
   : Subscriptor()
   ,
-  //              quadrature_points(1),
+  // quadrature_points(1),
   weights(1, 1.)
   , is_tensor_product_flag(false)
 {}
@@ -221,9 +217,8 @@ template <>
 Quadrature<1>::Quadrature(const Quadrature<0> &)
   : Subscriptor()
 {
-  // this function should never be
-  // called -- this should be the
-  // copy constructor in 1d...
+  // this function should never be called -- this should be the copy constructor
+  // in 1d...
   Assert(false, ExcImpossibleInDim(1));
 }
 #endif // DOXYGEN
@@ -482,9 +477,8 @@ QIterated<1>::QIterated(const Quadrature<1> &base_quadrature,
   Assert(n_copies > 0, ExcZero());
 
   if (!internal::QIteratedImplementation::uses_both_endpoints(base_quadrature))
-    // we don't have to skip some
-    // points in order to get a
-    // reasonable quadrature formula
+    // we don't have to skip some points in order to get a reasonable quadrature
+    // formula
     {
       unsigned int next_point = 0;
       for (unsigned int copy = 0; copy < n_copies; ++copy)
@@ -505,16 +499,12 @@ QIterated<1>::QIterated(const Quadrature<1> &base_quadrature,
     {
       unsigned int next_point = 0;
 
-      // first find out the weights of
-      // the left and the right boundary
-      // points. note that these usually
-      // are but need not necessarily be
-      // the same
+      // first find out the weights of the left and the right boundary points.
+      // note that these usually are but need not necessarily be the same
       double       double_point_weight = 0;
       unsigned int n_end_points        = 0;
       for (unsigned int i = 0; i < base_quadrature.size(); ++i)
-        // add up the weight if this
-        // is an endpoint
+        // add up the weight if this is an endpoint
         if ((base_quadrature.point(i) == Point<1>(0.0)) ||
             (base_quadrature.point(i) == Point<1>(1.0)))
           {
@@ -524,9 +514,8 @@ QIterated<1>::QIterated(const Quadrature<1> &base_quadrature,
       // scale the weight correctly
       double_point_weight /= n_copies;
 
-      // make sure the base quadrature formula
-      // has only one quadrature point
-      // per end point
+      // make sure the base quadrature formula has only one quadrature point per
+      // end point
       Assert(n_end_points == 2, ExcInvalidQuadratureFormula());
 
 
@@ -534,10 +523,8 @@ QIterated<1>::QIterated(const Quadrature<1> &base_quadrature,
         for (unsigned int q_point = 0; q_point < base_quadrature.size();
              ++q_point)
           {
-            // skip the left point of
-            // this copy since we
-            // have already entered
-            // it the last time
+            // skip the left point of this copy since we have already entered it
+            // the last time
             if ((copy > 0) && (base_quadrature.point(q_point) == Point<1>(0.0)))
               continue;
 
@@ -545,11 +532,8 @@ QIterated<1>::QIterated(const Quadrature<1> &base_quadrature,
               Point<1>(base_quadrature.point(q_point)(0) / n_copies +
                        (1.0 * copy) / n_copies);
 
-            // if this is the
-            // rightmost point of one
-            // of the non-last
-            // copies: give it the
-            // double weight
+            // if this is the rightmost point of one of the non-last copies:
+            // give it the double weight
             if ((copy != n_copies - 1) &&
                 (base_quadrature.point(q_point) == Point<1>(1.0)))
               this->weights[next_point] = double_point_weight;

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.