Commit 5befddd1 authored by Praetorius, Simon's avatar Praetorius, Simon

make parallelIndexSet a real set

parent 3f65bf6c
......@@ -30,6 +30,7 @@ void buildParallelIndexSet(Basis const& basis, PIS& pis)
auto lv = basis.localView();
AMDiS::GlobalBasisIdSet<Basis> dofIdSet(basis);
std::vector<bool> visited(basis.dimension(), false);
pis.beginResize();
for (auto const& e : elements(gv))
{
......@@ -38,6 +39,7 @@ void buildParallelIndexSet(Basis const& basis, PIS& pis)
for (std::size_t i = 0; i < dofIdSet.size(); ++i)
{
auto localIndex = lv.index(i);
if (!visited[localIndex]) {
auto globalId = dofIdSet.id(i);
PType attribute = dofIdSet.partitionType(i);
switch (attribute)
......@@ -52,13 +54,16 @@ void buildParallelIndexSet(Basis const& basis, PIS& pis)
pis.add(globalId, LI(localIndex, Attribute::overlap, true));
break;
case PType::OverlapEntity:
case PType::FrontEntity:
pis.add(globalId, LI(localIndex, Attribute::overlap, true));
break;
case PType::FrontEntity:
case PType::GhostEntity:
pis.add(globalId, LI(localIndex, Attribute::copy, true));
break;
}
visited[localIndex] = true;
}
}
dofIdSet.unbind();
lv.unbind();
......
Markdown is supported
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