From 57e522d00547cefb782d57c66e8723d7ae991217 Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Tue, 18 Feb 2014 14:08:26 +0000
Subject: [PATCH] Add trailing underscore to member

[[Imported from SVN: r12926]]
---
 dune/solvers/iterationsteps/cgstep.cc | 8 ++++----
 dune/solvers/iterationsteps/cgstep.hh | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dune/solvers/iterationsteps/cgstep.cc b/dune/solvers/iterationsteps/cgstep.cc
index f95821e4..13fa1432 100644
--- a/dune/solvers/iterationsteps/cgstep.cc
+++ b/dune/solvers/iterationsteps/cgstep.cc
@@ -17,7 +17,7 @@ void CGStep<MatrixType, VectorType>::preprocess()
     } else
         p_ = r_;
 
-    r_squared_old = p_*r_;
+    r_squared_old_ = p_*r_;
 }
 
 template <class MatrixType, class VectorType>
@@ -26,7 +26,7 @@ void CGStep<MatrixType, VectorType>::iterate()
     VectorType q(x_);
 
     matrix_.mv(p_, q);                             // q_0     = Ap_0
-    const double alpha = r_squared_old / (p_ * q); // alpha_0 = r_0*r_0/p_0*Ap_0
+    const double alpha = r_squared_old_ / (p_ * q); // alpha_0 = r_0*r_0/p_0*Ap_0
     x_.axpy(alpha, p_);                            // x_1     = x_0 + alpha_0 p_0
     r_.axpy(-alpha, q);                            // r_1     = r_0 - alpha_0 Ap_0
 
@@ -36,8 +36,8 @@ void CGStep<MatrixType, VectorType>::iterate()
         q = r_;
 
     const double r_squared = q * r_;
-    const double beta = r_squared / r_squared_old; // beta_0 = r_1*r_1/ (r_0*r_0)
+    const double beta = r_squared / r_squared_old_; // beta_0 = r_1*r_1/ (r_0*r_0)
     p_ *= beta;                                    // p_1 = r_1 + beta_0 p_0
     p_ += q;
-    r_squared_old = r_squared;
+    r_squared_old_ = r_squared;
 }
diff --git a/dune/solvers/iterationsteps/cgstep.hh b/dune/solvers/iterationsteps/cgstep.hh
index f782bae6..97f9e9be 100644
--- a/dune/solvers/iterationsteps/cgstep.hh
+++ b/dune/solvers/iterationsteps/cgstep.hh
@@ -38,7 +38,7 @@ namespace Dune {
             VectorType r_; // residual
             VectorType& x_;
             const MatrixType& matrix_;
-            double r_squared_old;
+            double r_squared_old_;
             Preconditioner<MatrixType, VectorType>* preconditioner_;
         };
 
-- 
GitLab