From 4a0c8db0a2242d903aea78bba200c051e9f115fd Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Fri, 16 May 2014 15:43:29 +0000 Subject: [PATCH] Rename members of TransferVectorTuple, for better readability [[Imported from SVN: r9749]] --- dune/gfe/parallel/vectorcommunicator.hh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/dune/gfe/parallel/vectorcommunicator.hh b/dune/gfe/parallel/vectorcommunicator.hh index f3d460c3..546563bf 100644 --- a/dune/gfe/parallel/vectorcommunicator.hh +++ b/dune/gfe/parallel/vectorcommunicator.hh @@ -13,11 +13,13 @@ class VectorCommunicator { struct TransferVectorTuple { typedef typename VectorType::value_type EntryType; - size_t row; - EntryType entry; + size_t globalIndex_; + EntryType value_; TransferVectorTuple() {} - TransferVectorTuple(const size_t& r, const EntryType& e) : row(r), entry(e) {} + TransferVectorTuple(const size_t& r, const EntryType& e) + : globalIndex_(r), + value_(e) {} }; private: @@ -52,7 +54,7 @@ public: VectorType globalVector(guIndex.nGlobalEntity()); for (size_t k = 0; k < globalVectorEntries.size(); ++k) - globalVector[globalVectorEntries[k].row] += globalVectorEntries[k].entry; + globalVector[globalVectorEntries[k].globalIndex_] += globalVectorEntries[k].value_; return globalVector; } @@ -64,7 +66,7 @@ public: VectorType globalVector(guIndex.nGlobalEntity()); for (size_t k = 0; k < globalVectorEntries.size(); ++k) - globalVector[globalVectorEntries[k].row] = globalVectorEntries[k].entry; + globalVector[globalVectorEntries[k].globalIndex_] = globalVectorEntries[k].value_; return globalVector; } @@ -72,7 +74,7 @@ public: VectorType scatter(const VectorType& global) { for (size_t k = 0; k < globalVectorEntries.size(); ++k) - globalVectorEntries[k].entry = global[globalVectorEntries[k].row]; + globalVectorEntries[k].value_ = global[globalVectorEntries[k].globalIndex_]; const int localSize = localVectorEntriesSizes[guIndex.getGridView().comm().rank()]; @@ -86,7 +88,7 @@ public: // And translate solution again for (size_t k = 0; k < localVectorEntries.size(); ++k) - x[guIndex.localIndex(localVectorEntries[k].row)] = localVectorEntries[k].entry; + x[guIndex.localIndex(localVectorEntries[k].globalIndex_)] = localVectorEntries[k].value_; return x; } -- GitLab