From dcccc18b297fc4a8761207fcaeaca1e910427873 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Mon, 26 May 2014 05:17:36 +0000
Subject: [PATCH] Loop over algebraic entities instead of grid entities after
 all

[[Imported from SVN: r9764]]
---
 dune/gfe/parallel/vectorcommunicator.hh | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/dune/gfe/parallel/vectorcommunicator.hh b/dune/gfe/parallel/vectorcommunicator.hh
index 10a40689..05910c94 100644
--- a/dune/gfe/parallel/vectorcommunicator.hh
+++ b/dune/gfe/parallel/vectorcommunicator.hh
@@ -28,9 +28,8 @@ private:
     std::vector<TransferVectorTuple> localVectorEntries;
 
     // Translate vector entries
-    const auto& gridView = guIndex.getGridView();
-    for (auto it = gridView.template begin<2>(); it != gridView.template end<2>(); ++ it)
-        localVectorEntries.push_back(TransferVectorTuple(guIndex.globalIndex(*it), localVector[guIndex.localIndex(*it)]));
+    for (int k=0; k<localVector.size(); k++)
+        localVectorEntries.push_back(TransferVectorTuple(guIndex.globalIndex(k), localVector[k]));
 
     // Get number of vector entries on each process
     localVectorEntriesSizes = MPIFunctions::shareSizes(guIndex.getGridView(), localVectorEntries.size());
@@ -89,7 +88,7 @@ public:
 
     // And translate solution again
     for (size_t k = 0; k < localVectorEntries.size(); ++k)
-      x[guIndex.localIndex(localVectorEntries[k].globalIndex_)] = localVectorEntries[k].value_;
+      x[k] = localVectorEntries[k].value_;
 
     return x;
   }
-- 
GitLab