]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove an unused variable. 4953/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 24 Aug 2017 17:25:10 +0000 (11:25 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 24 Aug 2017 19:11:18 +0000 (13:11 -0600)
The variable's documentation suggests that it will be used for a later
implementation of a 'vector rotation', but that has not materialized
in 10+ years, so delete it.

include/deal.II/lac/solver_gmres.h

index 447c7089b58e066f34865a02c79817e999baef53..42cd38d614977b6169f582c09d93d725e645c116 100644 (file)
@@ -102,12 +102,6 @@ namespace internal
        * Field for storing the vectors.
        */
       std::vector<typename VectorMemory<VectorType>::Pointer> data;
-
-      /**
-       * Offset of the first vector. This is for later when vector rotation
-       * will be implemented.
-       */
-      unsigned int offset;
     };
   }
 }
@@ -519,8 +513,7 @@ namespace internal
                 VectorMemory<VectorType> &vmem)
       :
       mem(vmem),
-      data (max_size),
-      offset(0)
+      data (max_size)
     {}
 
 
@@ -529,28 +522,28 @@ namespace internal
     inline VectorType &
     TmpVectors<VectorType>::operator[] (const unsigned int i) const
     {
-      Assert (i+offset<data.size(),
-              ExcIndexRange(i, -offset, data.size()-offset));
+      Assert (i<data.size(),
+              ExcIndexRange(i, 0, data.size()));
 
-      Assert (data[i-offset] != nullptr, ExcNotInitialized());
-      return *data[i-offset];
+      Assert (data[i] != nullptr, ExcNotInitialized());
+      return *data[i];
     }
 
 
 
     template <class VectorType>
     inline VectorType &
-    TmpVectors<VectorType>::operator() (const unsigned int i,
-                                        const VectorType       &temp)
+    TmpVectors<VectorType>::operator() (const unsigned int  i,
+                                        const VectorType   &temp)
     {
-      Assert (i+offset<data.size(),
-              ExcIndexRange(i,-offset, data.size()-offset));
-      if (data[i-offset] == nullptr)
+      Assert (i<data.size(),
+              ExcIndexRange(i, 0, data.size()));
+      if (data[i] == nullptr)
         {
-          data[i-offset] = std::move(typename VectorMemory<VectorType>::Pointer(mem));
-          data[i-offset]->reinit(temp);
+          data[i] = std::move(typename VectorMemory<VectorType>::Pointer(mem));
+          data[i]->reinit(temp);
         }
-      return *data[i-offset];
+      return *data[i];
     }
 
 

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.