diff --git a/dune/istl/matrixredistribute.hh b/dune/istl/matrixredistribute.hh index 4e035968e223acb9fe8f7ce289ffcdd6e8aa00a0..91a35cf683135cff536df4eff6f3abf0c55b0180 100644 --- a/dune/istl/matrixredistribute.hh +++ b/dune/istl/matrixredistribute.hh @@ -844,5 +844,22 @@ namespace Dune redistributeMatrixEntries(origMatrix, newMatrix, origComm, newComm, ri); } #endif + +template<typename M> + void redistributeMatrixEntries(M& origMatrix, M& newMatrix, + Dune::Amg::SequentialInformation& origComm, + Dune::Amg::SequentialInformation& newComm, + RedistributeInformation<Dune::Amg::SequentialInformation>& ri) + { + DUNE_THROW(InvalidStateException, "Trying to redistribute in sequential program!"); + } + template<typename M> + void redistributeMatrix(M& origMatrix, M& newMatrix, + Dune::Amg::SequentialInformation& origComm, + Dune::Amg::SequentialInformation& newComm, + RedistributeInformation<Dune::Amg::SequentialInformation>& ri) + { + DUNE_THROW(InvalidStateException, "Trying to redistribute in sequential program!"); + } } #endif diff --git a/dune/istl/paamg/hierarchy.hh b/dune/istl/paamg/hierarchy.hh index 705ac3a1beaac663020c07898d2538df3b967dc5..78bc746928544192a707b096e57c3c6da7705701 100644 --- a/dune/istl/paamg/hierarchy.hh +++ b/dune/istl/paamg/hierarchy.hh @@ -1192,7 +1192,7 @@ namespace Dune typename RedistributeInfoList::iterator riIter = redistributes_.begin(); Iterator level = matrices_.finest(), coarsest=matrices_.coarsest(); if(level.isRedistributed()) { - info->buildGlobalLookup(info->indexSet().size()); + info->buildGlobalLookup(level->getmat().N()); redistributeMatrixEntries(const_cast<Matrix&>(level->getmat()), const_cast<Matrix&>(level.getRedistributed().getmat()), *info,info.getRedistributed(), *riIter); @@ -1206,7 +1206,7 @@ namespace Dune ++riIter; productBuilder.calculate(fine, *(*amap), const_cast<Matrix&>(level->getmat()), *info, copyFlags); if(level.isRedistributed()) { - info->buildGlobalLookup(info->indexSet().size()); + info->buildGlobalLookup(level->getmat().N()); redistributeMatrixEntries(const_cast<Matrix&>(level->getmat()), const_cast<Matrix&>(level.getRedistributed().getmat()), *info, info.getRedistributed(), *riIter);