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

Synced with my version.

[[Imported from SVN: r1138]]
parent c89cc783
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ namespace Dune
template<typename T, typename E>
class IndicesCoarsener
{};
{ };
#if HAVE_MPI
......@@ -115,11 +115,10 @@ namespace Dune
{
AggregateRenumberer<G>::operator()(edge);
const IndexPair* pair= lookup_.pair(edge.target());
if(pair!=0) {
globalIndex(pair->global());
attribute(pair->local().attribute());
isPublic(pair->local().isPublic());
}
assert(pair!=static_cast<const IndexPair*>(0));
globalIndex(pair->global());
attribute(pair->local().attribute());
isPublic(pair->local().isPublic());
}
Vertex operator()(const GlobalIndex& global)
......@@ -162,7 +161,7 @@ namespace Dune
void globalIndex(const GlobalIndex& global)
{
globalIndex_ = global;
globalIndex_ = std::min(global,globalIndex_);
}
private:
......@@ -267,7 +266,8 @@ namespace Dune
const IndexPair* pair= lookup.pair(*index);
renumberer.reset();
if(pair!=0 && !ExcludedAttributes::contains(pair->local().attribute())) {
assert(pair!=0);
if(!ExcludedAttributes::contains(pair->local().attribute())) {
renumberer.attribute(pair->local().attribute());
renumberer.isPublic(pair->local().isPublic());
renumberer.globalIndex(pair->global());
......@@ -279,12 +279,11 @@ namespace Dune
typedef typename GlobalLookupIndexSet::IndexPair::GlobalIndex GlobalIndex;
if(renumberer.globalIndex()!=std::numeric_limits<GlobalIndex>::max()) {
//std::cout <<" Adding global="<< renumberer.globalIndex()<<" local="<<static_cast<std::size_t>(renumberer)<<std::endl;
coarseIndices.add(renumberer.globalIndex(),
LocalIndex(renumberer, renumberer.attribute(),
renumberer.isPublic()));
}
assert(renumberer.globalIndex()!=std::numeric_limits<GlobalIndex>::max());
coarseIndices.add(renumberer.globalIndex(),
LocalIndex(renumberer, renumberer.attribute(),
renumberer.isPublic()));
aggregates[*index] = renumberer;
++renumberer;
......
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