]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Rename local variables. 3387/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 3 Nov 2016 01:51:17 +0000 (19:51 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 3 Nov 2016 01:51:17 +0000 (19:51 -0600)
The variables in question have the same name as a function argument, and
are only used in a local block. They may as well be renamed.

include/deal.II/algorithms/newton.templates.h

index 254563f2d3b7eaf95649998e7d12e0401cca7dc2..4a95e74a026e88dd25d00370a346b206d6d5cdad 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2006 - 2015 by the deal.II authors
+// Copyright (C) 2006 - 2016 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -93,7 +93,8 @@ namespace Algorithms
 
   template <typename VectorType>
   void
-  Newton<VectorType>::operator() (AnyData &out, const AnyData &in)
+  Newton<VectorType>::operator() (AnyData &out,
+                                  const AnyData &in)
   {
     Assert (out.size() == 1, ExcNotImplemented());
     deallog.push ("Newton");
@@ -128,15 +129,15 @@ namespace Algorithms
 
     if (debug_vectors)
       {
-        AnyData out;
+        AnyData tmp;
         VectorType *p = &u;
-        out.add<const VectorType *>(p, "solution");
+        tmp.add<const VectorType *>(p, "solution");
         p = Du;
-        out.add<const VectorType *>(p, "update");
+        tmp.add<const VectorType *>(p, "update");
         p = res;
-        out.add<const VectorType *>(p, "residual");
+        tmp.add<const VectorType *>(p, "residual");
         *data_out << step;
-        *data_out << out;
+        *data_out << tmp;
       }
 
     while (control.check(step++, resnorm) == SolverControl::iterate)
@@ -159,15 +160,15 @@ namespace Algorithms
 
         if (debug_vectors)
           {
-            AnyData out;
+            AnyData tmp;
             VectorType *p = &u;
-            out.add<const VectorType *>(p, "solution");
+            tmp.add<const VectorType *>(p, "solution");
             p = Du;
-            out.add<const VectorType *>(p, "update");
+            tmp.add<const VectorType *>(p, "update");
             p = res;
-            out.add<const VectorType *>(p, "residual");
+            tmp.add<const VectorType *>(p, "residual");
             *data_out << step;
-            *data_out << out;
+            *data_out << tmp;
           }
 
         u.add(-1., *Du);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.