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

Fixed bug in indicescoarsener.

All tests should run through now again.

[[Imported from SVN: r3668]]
parent a2444bbd
No related branches found
No related tags found
No related merge requests found
......@@ -60,6 +60,15 @@ namespace Dune
*/
typedef RemoteIndices<ParallelIndexSet> RemoteIndices;
/**
* @brief Build the coarse index set after the aggregatio.
*
* @param fineInfo The parallel information at the fine level.
* @param fineGraph The graph of the fine lecel,
* @param vistedMap Map for marking vertices as visited.
* @param aggregates The mapping of unknowns onto aggregates.
* @return The number of unknowns on the coarse level.
*/
template<typename Graph, typename VM>
static typename Graph::VertexDescriptor
coarsen(ParallelInformation& fineInfo,
......@@ -224,6 +233,7 @@ namespace Dune
}
aggregates[*index] = renumberer;
++renumberer;
}
}
......
......@@ -95,7 +95,6 @@ void testCoarsenIndices(int N)
Dune::Amg::printAggregates2d(aggregatesMap, n, N, std::cout);
communicator.template forward<Dune::Amg::AggregatesGatherScatter<typename MatrixGraph::VertexDescriptor,ParallelIndexSet> >(gmap);
pinfo.freeGlobalLookup();
std::cout<<"Communicated: ";
Dune::Amg::printAggregates2d(aggregatesMap, n, N, std::cout);
......@@ -124,7 +123,10 @@ void testCoarsenIndices(int N)
BCRSMat* coarseMat = productBuilder.build(mat, mg, visitedMap2, pinfo,
aggregatesMap, coarseIndices.size(),
Dune::EnumItem<GridFlag,overlap>());
pinfo.freeGlobalLookup();
productBuilder.calculate(mat, aggregatesMap, *coarseMat);
if(N<5) {
Dune::printmatrix(std::cout,mat,"fine","row",9,1);
Dune::printmatrix(std::cout,*coarseMat,"coarse","row",9,1);
......
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