From 2bb07e1f13232fabd91b97213f727fbcfc504a93 Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Fri, 30 Aug 2013 01:43:53 +0200
Subject: [PATCH] [Cleanup] Rename state_fpi_*

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

diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc
index 7b3c883b..e437bde7 100644
--- a/src/one-body-sample.cc
+++ b/src/one-body-sample.cc
@@ -474,7 +474,7 @@ int main(int argc, char *argv[]) {
     SingletonVectorType alpha(finestSize);
 
     auto const timesteps = parset.get<size_t>("timeSteps.number"),
-               state_fpi_max = parset.get<size_t>("v.fpi.maximumIterations"),
+               maximumStateFPI = parset.get<size_t>("v.fpi.maximumIterations"),
                maximumIterations =
                    parset.get<size_t>("v.solver.maximumIterations");
     auto const tau = parset.get<double>("problem.finalTime") / timesteps,
@@ -533,17 +533,16 @@ int main(int argc, char *argv[]) {
       VectorType u_saved;
       SingletonVectorType alpha_saved;
       double lastStateCorrection;
-      for (size_t state_fpi = 1; state_fpi <= state_fpi_max; ++state_fpi) {
+      for (size_t stateFPI = 1; stateFPI <= maximumStateFPI; ++stateFPI) {
         stateUpdater->solve(v);
         stateUpdater->extractState(alpha);
 
-        if (state_fpi == 1)
+        if (stateFPI == 1)
           relaxationWriter << "N ";
         else {
           double const stateCorrection =
               stateEnergyNorm.diff(alpha, alpha_saved);
-          if (state_fpi <=
-              2 // lastStateCorrection is only set for state_fpi > 2
+          if (stateFPI <= 2 // lastStateCorrection is only set for stateFPI > 2
               or stateCorrection < requiredReduction * lastStateCorrection)
             relaxationWriter << "N ";
           else {
@@ -563,12 +562,12 @@ int main(int argc, char *argv[]) {
         if (printProgress)
           (std::cout << '.').flush();
 
-        if (state_fpi > 1) {
+        if (stateFPI > 1) {
           double const velocityCorrection = AMNorm.diff(u_saved, u);
           if (velocityCorrection < fixedPointTolerance)
             break;
         }
-        if (state_fpi == state_fpi_max)
+        if (stateFPI == maximumStateFPI)
           DUNE_THROW(Dune::Exception, "FPI failed to converge");
 
         alpha_saved = alpha;
-- 
GitLab