From 220420f6e55984ff2e0a021404f791b44c3ae1cc Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Sun, 30 Oct 2011 01:54:03 +0200 Subject: [PATCH] Fix logical bug: b already has a minus --- src/myblockproblem.hh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/myblockproblem.hh b/src/myblockproblem.hh index ceed350d..601652f8 100644 --- a/src/myblockproblem.hh +++ b/src/myblockproblem.hh @@ -109,9 +109,9 @@ class MyBlockProblem<ConvexProblemTypeTEMPLATE>::IterateObject { if (j == m) localA = &(*it); // localA = &A[m][m] - it->umv(u[j], localb); // localb += A[m][j] * u[j] + it->mmv(u[j], localb); // localb += A[m][j] * u[j] } - localb -= problem.f[m]; // localb -= b[m] + localb += problem.f[m]; // localb -= b[m] assert(localA != NULL); // FIXME: Hardcoding a fixed function here for now @@ -126,8 +126,7 @@ class MyBlockProblem<ConvexProblemTypeTEMPLATE>::IterateObject { Dune::minimise(localJ, ui_copy, correction); ui_copy += correction; } - // FIXME: this makes no sense. Why does it work this way?! - ui -= ui_copy; + ui += ui_copy; return; } -- GitLab