From 0b54ed957bf35949a5ba821b0db3b6af7a4de25b Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Wed, 4 Jan 2012 15:45:27 +0100 Subject: [PATCH] Bug fix: Truncate coarse correction! --- dune/tectonic/myblockproblem.hh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh index f226fd70..2005947f 100644 --- a/dune/tectonic/myblockproblem.hh +++ b/dune/tectonic/myblockproblem.hh @@ -76,7 +76,11 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { Linearization const &linearization) const { // TODO: implement (not urgent) projected_v = v; - }; + for (size_t i = 0; i < v.size(); ++i) + for (int j = 0; j < block_size; ++j) + if (linearization.truncation[i][j]) + projected_v[i][j] = 0; + } double computeDampingParameter(VectorType const &u, VectorType const &projected_v) const { -- GitLab