Skip to content
Snippets Groups Projects
Commit 7d6a8e5a authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

optimized performance of InfoCollection generation

parent d5ddf031
Branches
No related merge requests found
...@@ -55,23 +55,24 @@ void createWithNeighborhood(Accessor& ac, const BlockForest& bf, pe::InfoCollect ...@@ -55,23 +55,24 @@ void createWithNeighborhood(Accessor& ac, const BlockForest& bf, pe::InfoCollect
++info.computationalWeight; ++info.computationalWeight;
} }
} for (uint_t branchID = 0; branchID < 8; ++branchID)
for (uint_t branchID = 0; branchID < 8; ++branchID)
{
const auto childID = BlockID(block->getId(), branchID);
const auto childAABB = bf.getAABBFromBlockId(childID);
pe::BlockInfo& childInfo = ic[childID];
if (childAABB.contains(ac.getPosition(idx)))
{ {
if (data::particle_flags::isSet( ac.getFlags(idx), data::particle_flags::GHOST)) const auto childID = BlockID(block->getId(), branchID);
{ const auto childAABB = bf.getAABBFromBlockId(childID);
++childInfo.communicationWeight; pe::BlockInfo& childInfo = ic[childID];
} else if (childAABB.contains(ac.getPosition(idx)))
{ {
++childInfo.computationalWeight; if (data::particle_flags::isSet( ac.getFlags(idx), data::particle_flags::GHOST))
{
++childInfo.communicationWeight;
} else
{
++childInfo.computationalWeight;
}
break; //particle can only be located within one child
} }
} }
break; //particle can only be located within one block
} }
} }
} }
......
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