From ccfb5aca83f0237bbe0b0b1c6896b513c0cef660 Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Thu, 29 Aug 2013 23:03:37 +0200
Subject: [PATCH] [Cleanup] Rename corrections

---
 src/one-body-sample.cc | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc
index 04e780cb..70c2db74 100644
--- a/src/one-body-sample.cc
+++ b/src/one-body-sample.cc
@@ -531,16 +531,17 @@ int main(int argc, char *argv[]) {
       // Q: is this reasonable?
       VectorType u;
       VectorType u_saved;
-      double lastCorrection;
+      double lastStateCorrection;
       for (size_t state_fpi = 1; state_fpi <= state_fpi_max; ++state_fpi) {
         stateUpdater->solve(v);
         {
           SingletonVectorType computed_state;
           stateUpdater->extractState(computed_state);
-          double const correction = stateEnergyNorm.diff(computed_state, alpha);
+          double const stateCorrection =
+              stateEnergyNorm.diff(computed_state, alpha);
 
-          if (state_fpi <= 2 or correction <
-              requiredReduction * lastCorrection) {
+          if (state_fpi <= 2 or stateCorrection <
+              requiredReduction * lastStateCorrection) {
             alpha = computed_state;
             relaxationWriter << "N ";
           } else {
@@ -548,7 +549,7 @@ int main(int argc, char *argv[]) {
             Arithmetic::addProduct(alpha, 1.0 - relaxation, computed_state);
             relaxationWriter << "Y ";
           }
-          lastCorrection = correction;
+          lastStateCorrection = stateCorrection;
         }
 
         solveVelocityProblem(velocityIterate, alpha);
@@ -561,8 +562,8 @@ int main(int argc, char *argv[]) {
           (std::cout << '.').flush();
 
         if (state_fpi > 1) {
-          double const correctionNorm = AMNorm.diff(u_saved, u);
-          if (correctionNorm < fixedPointTolerance)
+          double const velocityCorrection = AMNorm.diff(u_saved, u);
+          if (velocityCorrection < fixedPointTolerance)
             break;
         }
         if (state_fpi == state_fpi_max)
-- 
GitLab