From c43b4e4d41e2778d8606ecc03207e07c06fb0e83 Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Thu, 5 Jul 2012 16:57:12 +0200
Subject: [PATCH] Cosmetic changes; to be more similar to dune-tnnmg

---
 dune/tectonic/myblockproblem.hh | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh
index ca057aff..d572dd65 100644
--- a/dune/tectonic/myblockproblem.hh
+++ b/dune/tectonic/myblockproblem.hh
@@ -211,14 +211,16 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
         assert(D[1] <= 0);
     }
 
-    // apply truncation to system
+    // apply truncation to stiffness matrix and rhs
     for (size_t row = 0; row < linearization.A.N(); ++row) {
-      auto const end = linearization.A[row].end();
-      for (auto it = linearization.A[row].begin(); it != end; ++it) {
-        int const col = it.index();
-        for (size_t i = 0; i < it->N(); ++i) {
-          auto const blockEnd = (*it)[i].end();
-          for (auto blockIt = (*it)[i].begin(); blockIt != blockEnd; ++blockIt)
+      auto const col_end = linearization.A[row].end();
+      for (auto col_it = linearization.A[row].begin(); col_it != col_end;
+           ++col_it) {
+        int const col = col_it.index();
+        for (size_t i = 0; i < col_it->N(); ++i) {
+          auto const blockEnd = (*col_it)[i].end();
+          for (auto blockIt = (*col_it)[i].begin(); blockIt != blockEnd;
+               ++blockIt)
             if (linearization.truncation[row][i] or linearization
                     .truncation[col][blockIt.index()])
               *blockIt = 0.0;
-- 
GitLab