From 1492f85d3b309678bc4a583fe7585c6f3b7f02f2 Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Mon, 29 Oct 2012 15:44:27 +0100
Subject: [PATCH] Move an assignment out of a loop

---
 src/one-body-sample.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc
index 055ac9f6..fe3c4590 100644
--- a/src/one-body-sample.cc
+++ b/src/one-body-sample.cc
@@ -358,6 +358,8 @@ int main(int argc, char *argv[]) {
         break;
     }
 
+    auto const state_fpi_max =
+        parset.get<size_t>("solver.tnnmg.fixed_point_iterations");
     for (size_t run = 1; run <= timesteps; ++run) {
       double const time = tau * run;
       {
@@ -375,8 +377,6 @@ int main(int argc, char *argv[]) {
                                   problem_A);
 
         VectorType u_saved;
-        auto const state_fpi_max =
-            parset.get<size_t>("solver.tnnmg.fixed_point_iterations");
         for (size_t state_fpi = 1; state_fpi <= state_fpi_max; ++state_fpi) {
           auto myGlobalNonlinearity =
               assemble_nonlinearity<MatrixType, VectorType>(
-- 
GitLab