Skip to content
Snippets Groups Projects
Commit 270bdb30 authored by Markus Blatt's avatar Markus Blatt
Browse files

Support parallel recalculation of galerkin product.

[[Imported from SVN: r1348]]
parent 24337b5a
No related branches found
No related tags found
No related merge requests found
...@@ -729,7 +729,6 @@ namespace Dune ...@@ -729,7 +729,6 @@ namespace Dune
RedistributeInformation<SequentialInformation>& ri) RedistributeInformation<SequentialInformation>& ri)
{ {
return true; return true;
} }
template<class M, class IS, class A> template<class M, class IS, class A>
...@@ -1247,13 +1246,29 @@ namespace Dune ...@@ -1247,13 +1246,29 @@ namespace Dune
AggregatesMapIterator amap = aggregatesMaps_.begin(); AggregatesMapIterator amap = aggregatesMaps_.begin();
BaseGalerkinProduct productBuilder; BaseGalerkinProduct productBuilder;
InfoIterator info = parallelInformation_.finest(); InfoIterator info = parallelInformation_.finest();
typename RedistributeInfoList::iterator riIter = redistributes_.begin();
Iterator level = matrices_.finest(), coarsest=matrices_.coarsest();
if(level.isRedistributed()) {
info->buildGlobalLookup(info->indexSet().size());
redistributeMatrixEntries(const_cast<Matrix&>(level->getmat()),
const_cast<Matrix&>(level.getRedistributed().getmat()),
*info,info.getRedistributed(), *riIter);
info->freeGlobalLookup();
}
for(Iterator level = matrices_.finest(), coarsest=matrices_.coarsest(); level!=coarsest; ++amap) { for(; level!=coarsest; ++amap) {
const Matrix& fine = level->getmat(); const Matrix& fine = (level.isRedistributed() ? level.getRedistributed() : *level).getmat();
++level; ++level;
++info; ++info;
++riIter;
productBuilder.calculate(fine, *(*amap), const_cast<Matrix&>(level->getmat()), *info, copyFlags); productBuilder.calculate(fine, *(*amap), const_cast<Matrix&>(level->getmat()), *info, copyFlags);
if(level.isRedistributed()) {
info->buildGlobalLookup(info->indexSet().size());
redistributeMatrixEntries(const_cast<Matrix&>(level->getmat()),
const_cast<Matrix&>(level.getRedistributed().getmat()), *info,
info.getRedistributed(), *riIter);
info->freeGlobalLookup();
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment