From 8ea612fdd687bd920317ebcabb10937edea8eef8 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Sun, 25 May 2014 04:42:12 +0000 Subject: [PATCH] Set output vector of reduceAdd to 0 before starting to add stuff to it. No idea why valgrind didn't complain about this. [[Imported from SVN: r9758]] --- dune/gfe/parallel/vectorcommunicator.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/dune/gfe/parallel/vectorcommunicator.hh b/dune/gfe/parallel/vectorcommunicator.hh index 546563bf..10a40689 100644 --- a/dune/gfe/parallel/vectorcommunicator.hh +++ b/dune/gfe/parallel/vectorcommunicator.hh @@ -52,6 +52,7 @@ public: transferVector(localVector); VectorType globalVector(guIndex.nGlobalEntity()); + globalVector = 0; for (size_t k = 0; k < globalVectorEntries.size(); ++k) globalVector[globalVectorEntries[k].globalIndex_] += globalVectorEntries[k].value_; -- GitLab