From 3270b21b4350ee511cc6a309ecd4ab5a547a1282 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Wed, 4 Jan 2012 16:04:28 +0100 Subject: [PATCH] Cleanup --- dune/tectonic/myblockproblem.hh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh index 19ea4959..2d702879 100644 --- a/dune/tectonic/myblockproblem.hh +++ b/dune/tectonic/myblockproblem.hh @@ -188,19 +188,13 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { linearization.b *= -1.0; // apply truncation to system - typename Linearization::MatrixType::row_type::Iterator it; - typename Linearization::MatrixType::row_type::Iterator end; for (size_t row = 0; row < linearization.A.N(); ++row) { - it = linearization.A[row].begin(); - end = linearization.A[row].end(); - for (; it != end; ++it) { + 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) { - typename Linearization::MatrixType::block_type::row_type::Iterator - blockIt = (*it)[i].begin(); - typename Linearization::MatrixType::block_type::row_type:: - Iterator const blockEnd = (*it)[i].end(); - for (; blockIt != blockEnd; ++blockIt) + auto const blockEnd = (*it)[i].end(); + for (auto blockIt = (*it)[i].begin(); blockIt != blockEnd; ++blockIt) if (linearization.truncation[row][i] or linearization .truncation[col][blockIt.index()]) *blockIt = 0.0; -- GitLab