From 0c3c7bc3d0c75acb272fe22be419ab648d7fed27 Mon Sep 17 00:00:00 2001
From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de>
Date: Sun, 12 Feb 2017 14:51:24 +0100
Subject: [PATCH] [staggeredGrid] Rename some local variables being shadowed by
 global ones

* To supress compiler warnings
---
 dumux/implicit/staggered/assembler.hh     | 21 ++++++++++-----------
 dumux/implicit/staggered/localresidual.hh |  4 ++--
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/dumux/implicit/staggered/assembler.hh b/dumux/implicit/staggered/assembler.hh
index c78e306d39..83e3d878fc 100644
--- a/dumux/implicit/staggered/assembler.hh
+++ b/dumux/implicit/staggered/assembler.hh
@@ -139,13 +139,12 @@ private:
         for (const auto& element : elements(this->gridView_()))
         {
             // the global index of the element at hand
-            const auto globalI = this->elementMapper_().index(element);
-
-            for (auto&& globalJ : assemblyMap(cellCenterIdx, cellCenterIdx, globalI))
-                occupationPatternA11.add(globalI, globalJ);
-            for (auto&& globalJ : assemblyMap(cellCenterIdx, faceIdx, globalI))
-                occupationPatternA12.add(globalI, globalJ);
+            const auto ccGlobalI = this->elementMapper_().index(element);
 
+            for (auto&& ccGlobalJ : assemblyMap(cellCenterIdx, cellCenterIdx, ccGlobalI))
+                occupationPatternA11.add(ccGlobalI, ccGlobalJ);
+            for (auto&& faceGlobalJ : assemblyMap(cellCenterIdx, faceIdx, ccGlobalI))
+                occupationPatternA12.add(ccGlobalI, faceGlobalJ);
 
             auto fvGeometry = localView(this->problem_().model().globalFvGeometry());
             fvGeometry.bindElement(element);
@@ -153,11 +152,11 @@ private:
             // loop over sub control faces
             for (auto&& scvf : scvfs(fvGeometry))
             {
-                const auto globalI = scvf.dofIndex();
-                for (auto&& globalJ : assemblyMap(faceIdx, cellCenterIdx, scvf.index()))
-                    occupationPatternA21.add(globalI, globalJ);
-                for (auto&& globalJ : assemblyMap(faceIdx, faceIdx, scvf.index()))
-                    occupationPatternA22.add(globalI, globalJ);
+                const auto faceGlobalI = scvf.dofIndex();
+                for (auto&& ccGlobalJ : assemblyMap(faceIdx, cellCenterIdx, scvf.index()))
+                    occupationPatternA21.add(faceGlobalI, ccGlobalJ);
+                for (auto&& faceGlobalJ : assemblyMap(faceIdx, faceIdx, scvf.index()))
+                    occupationPatternA22.add(faceGlobalI, faceGlobalJ);
             }
         }
         // export patterns to matrices
diff --git a/dumux/implicit/staggered/localresidual.hh b/dumux/implicit/staggered/localresidual.hh
index 26252862f9..4274021534 100644
--- a/dumux/implicit/staggered/localresidual.hh
+++ b/dumux/implicit/staggered/localresidual.hh
@@ -278,8 +278,8 @@ public:
     const auto& faceResiduals() const
     { return faceResiduals_; }
 
-    const auto& faceResidual(const int faceIdx) const
-    { return faceResiduals_[faceIdx]; }
+    const auto& faceResidual(const int fIdx) const
+    { return faceResiduals_[fIdx]; }
 
 
 protected:
-- 
GitLab