]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Provide a more verbose name for a variable 6870/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 2 Jul 2018 12:20:42 +0000 (14:20 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 2 Jul 2018 12:20:42 +0000 (14:20 +0200)
examples/step-27/step-27.cc

index 81120240d1c1a903212325d59488d9bb66b5bf68..8a1871d25d0481cef0378e188455ec15252cc6aa 100644 (file)
@@ -715,11 +715,10 @@ namespace Step27
                 std::log(2.0 * numbers::PI * std::sqrt(1. * res.first[f]));
           }
 
-        // We have to calculate the logarithms of absolute
-        // values of coefficients and use it in linear regression fit to
-        // obtain $\mu$.
-        for (double &f : res.second)
-          f = std::log(f);
+        // We have to calculate the logarithms of absolute values of
+        // coefficients and use it in a linear regression fit to obtain $\mu$.
+        for (double &residual_element : res.second)
+          residual_element = std::log(residual_element);
 
         std::pair<double, double> fit =
           FESeries::linear_regression(ln_k, res.second);

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.