From a1827731a8eafabb3aad6a2fa7218b877a2e0718 Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Thu, 16 Aug 2012 09:14:26 +0200
Subject: [PATCH] alpha_new -> alpha

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

diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc
index 9fc19e0b..e3a19690 100644
--- a/src/one-body-sample.cc
+++ b/src/one-body-sample.cc
@@ -198,8 +198,8 @@ int main(int argc, char *argv[]) {
     VectorType u_diff(finestSize);
     u_diff = 0.0; // Has to be zero!
 
-    auto alpha_new = Dune::make_shared<SingletonVectorType>(finestSize);
-    *alpha_new = alpha_old;
+    auto alpha = Dune::make_shared<SingletonVectorType>(finestSize);
+    *alpha = alpha_old;
 
     SingletonVectorType vonMisesStress;
     VectorType rhs;
@@ -268,8 +268,7 @@ int main(int argc, char *argv[]) {
              ++state_fpi) {
           auto myGlobalNonlinearity =
               assemble_nonlinearity<MatrixType, VectorType>(
-                  parset.sub("boundary.friction"), nodalIntegrals, alpha_new,
-                  h);
+                  parset.sub("boundary.friction"), nodalIntegrals, alpha, h);
           MyConvexProblemType const myConvexProblem(stiffnessMatrix,
                                                     *myGlobalNonlinearity, rhs);
 
@@ -295,12 +294,11 @@ int main(int argc, char *argv[]) {
               switch (parset.get<Config::state_model>(
                   "boundary.friction.state.model")) {
                 case Config::Dieterich:
-                  (*alpha_new)[i] =
+                  (*alpha)[i] =
                       state_update_dieterich(h, unorm / L, alpha_old[i]);
                   break;
                 case Config::Ruina:
-                  (*alpha_new)[i] =
-                      state_update_ruina(h, unorm / L, alpha_old[i]);
+                  (*alpha)[i] = state_update_ruina(h, unorm / L, alpha_old[i]);
                   break;
               }
             }
@@ -319,7 +317,7 @@ int main(int argc, char *argv[]) {
         if (parset.get<bool>("writeEvolution")) {
           double out;
           neumannFunction.evaluate(time, out);
-          octave_writer << (*alpha_new)[first_frictional_node][0] << " "
+          octave_writer << (*alpha)[first_frictional_node][0] << " "
                         << u[first_frictional_node][0] * 1e6 << " " << out
                         << std::endl;
         }
@@ -330,7 +328,7 @@ int main(int argc, char *argv[]) {
         if (parset.get<bool>("printVelocitySteppingComparison")) {
           double const v = u_diff[first_frictional_node].two_norm() / h / L;
 
-          double const euler = (*alpha_new)[first_frictional_node];
+          double const euler = (*alpha)[first_frictional_node];
           double direct;
           if (run < 120) {
             direct = euler;
@@ -353,7 +351,7 @@ int main(int argc, char *argv[]) {
         // Record the coefficient of friction at a fixed node
         if (parset.get<bool>("printCoefficient")) {
           double const V = u_diff[first_frictional_node].two_norm();
-          double const state = (*alpha_new)[first_frictional_node];
+          double const state = (*alpha)[first_frictional_node];
 
           coefficient_writer << (mu + a * std::log(V * eta) +
                                  b * (state - std::log(eta * L))) << std::endl;
@@ -361,7 +359,7 @@ int main(int argc, char *argv[]) {
       }
 
       u += u_diff;
-      alpha_old = *alpha_new;
+      alpha_old = *alpha;
 
       // Compute von Mises stress and write everything to a file
       if (parset.get<bool>("writeVTK")) {
@@ -373,7 +371,7 @@ int main(int argc, char *argv[]) {
             .assemble(localStressAssembler, vonMisesStress, true);
 
         writeVtk<P1Basis, P0Basis, VectorType, SingletonVectorType, GridView>(
-            p1Basis, u, *alpha_new, p0Basis, vonMisesStress, leafView,
+            p1Basis, u, *alpha, p0Basis, vonMisesStress, leafView,
             (boost::format("obs%d") % run).str());
       }
     }
-- 
GitLab