Commit d2048505 authored by Lena Walter's avatar Lena Walter
Browse files

changed globalPhase Storage: avoid counting the ghost nodes in parallel runs

reviewed by Melanie


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10194 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent bfcfbd92
......@@ -219,12 +219,16 @@ public:
ElementIterator elemIt = this->gridView_().template begin<0>();
const ElementIterator elemEndIt = this->gridView_().template end<0>();
for (; elemIt != elemEndIt; ++elemIt) {
this->localResidual().evalPhaseStorage(*elemIt, phaseIdx);
if(elemIt->partitionType() == Dune::InteriorEntity)
{
this->localResidual().evalPhaseStorage(*elemIt, phaseIdx);
for (unsigned int i = 0; i < this->localResidual().storageTerm().size(); ++i)
storage += this->localResidual().storageTerm()[i];
}
}
}
if (this->gridView_().comm().size() > 1)
storage = this->gridView_().comm().sum(storage);
}
......
......@@ -207,12 +207,14 @@ public:
ElementIterator elemIt = this->gridView_().template begin<0>();
const ElementIterator elemEndIt = this->gridView_().template end<0>();
for (; elemIt != elemEndIt; ++elemIt) {
if(elemIt->partitionType() == Dune::InteriorEntity)
{
this->localResidual().evalPhaseStorage(*elemIt, phaseIdx);
for (unsigned int i = 0; i < this->localResidual().storageTerm().size(); ++i)
storage += this->localResidual().storageTerm()[i];
}
}
}
if (this->gridView_().comm().size() > 1)
storage = this->gridView_().comm().sum(storage);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment