From 19e86cbd7eb495ab7b917b476bc5e4bc38e5a2ff Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Mon, 10 Sep 2012 12:31:35 +0200
Subject: [PATCH] Rename: solution -> u

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

diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc
index 441355f9..5a7fa1df 100644
--- a/src/one-body-sample.cc
+++ b/src/one-body-sample.cc
@@ -197,7 +197,7 @@ int main(int argc, char *argv[]) {
     VectorType u_diff(finestSize);
     u_diff = 0.0; // Has to be zero!
 
-    VectorType solution(finestSize);
+    VectorType u(finestSize);
 
     SingletonVectorType alpha_old(finestSize);
     alpha_old = parset.get<double>("boundary.friction.state.initial");
@@ -277,7 +277,7 @@ int main(int argc, char *argv[]) {
 
         timeSteppingScheme->setup(problem_rhs, problem_iterate, problem_A);
 
-        VectorType solution_saved = u_old;
+        VectorType u_saved = u_old;
         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) {
@@ -297,7 +297,7 @@ int main(int argc, char *argv[]) {
               false); // absolute error
           overallSolver.solve();
 
-          timeSteppingScheme->extractSolution(problem_iterate, solution);
+          timeSteppingScheme->extractSolution(problem_iterate, u);
           timeSteppingScheme->extractDifference(problem_iterate, u_diff);
 
           // Update the state
@@ -325,11 +325,11 @@ int main(int argc, char *argv[]) {
             std::cerr << '.';
             std::cerr.flush();
           }
-          if (energyNorm.diff(solution_saved, solution) <
+          if (energyNorm.diff(u_saved, u) <
               parset.get<double>("solver.tnnmg.fixed_point_tolerance"))
             break;
           else
-            solution_saved = solution;
+            u_saved = u;
 
           if (state_fpi == state_fpi_max)
             std::cerr << "[ref = " << refinements
@@ -345,8 +345,8 @@ int main(int argc, char *argv[]) {
           double out;
           neumannFunction.evaluate(time, out);
           octave_writer << alpha[first_frictional_node][0] << " "
-                        << solution[first_frictional_node][0] * 1e6 << " "
-                        << out << std::endl;
+                        << u[first_frictional_node][0] * 1e6 << " " << out
+                        << std::endl;
         }
 
         // Comparison with the analytic solution of a velocity stepping test
@@ -392,7 +392,7 @@ int main(int argc, char *argv[]) {
         std::cout << std::endl;
       }
       u_old_old = u_old;
-      u_old = solution;
+      u_old = u;
       alpha_old = alpha;
 
       // Compute von Mises stress and write everything to a file
@@ -400,12 +400,12 @@ int main(int argc, char *argv[]) {
         VonMisesStressAssembler<GridType> localStressAssembler(
             E, nu,
             Dune::make_shared<BasisGridFunction<P1Basis, VectorType> const>(
-                p1Basis, solution));
+                p1Basis, u));
         FunctionalAssembler<P0Basis>(p0Basis)
             .assemble(localStressAssembler, vonMisesStress, true);
 
         writeVtk<P1Basis, P0Basis, VectorType, SingletonVectorType, GridView>(
-            p1Basis, solution, alpha, p0Basis, vonMisesStress, leafView,
+            p1Basis, u, alpha, p0Basis, vonMisesStress, leafView,
             (boost::format("obs%d") % run).str());
       }
     }
-- 
GitLab