From 4090de30fdcd6c9e2bdb231ed3d1b684cd4efd86 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Sun, 30 Oct 2011 01:58:09 +0200 Subject: [PATCH] Make `a = 0; a += b' into `a = b' --- src/myblockproblem.hh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/myblockproblem.hh b/src/myblockproblem.hh index 601652f8..a294346c 100644 --- a/src/myblockproblem.hh +++ b/src/myblockproblem.hh @@ -100,7 +100,7 @@ class MyBlockProblem<ConvexProblemTypeTEMPLATE>::IterateObject { int const m = i; LocalMatrixType const* localA = NULL; - LocalVectorType localb(0); + LocalVectorType localb(problem.f[m]); typename MatrixType::row_type::ConstIterator it; typename MatrixType::row_type::ConstIterator end = problem.A[i].end(); @@ -111,7 +111,6 @@ class MyBlockProblem<ConvexProblemTypeTEMPLATE>::IterateObject { it->mmv(u[j], localb); // localb += A[m][j] * u[j] } - localb += problem.f[m]; // localb -= b[m] assert(localA != NULL); // FIXME: Hardcoding a fixed function here for now -- GitLab