Commit 175527ee authored by Quentin Khan's avatar Quentin Khan

Adaptive algorithms: do not call P2L/M2P on empty leaves

parent 008c4f7c
......@@ -195,6 +195,9 @@ public:
for(node_t* node : _tree.leaves()) {
if(node->getParticleContainer()->size() > 0) {
for(node_t* w_item : node->W) {
if(w_item->is_leaf() && w_item->getParticleContainer()->size() == 0) {
continue;
}
_kernel.P2L(w_item->getData(), node->getParticleContainer());
}
}
......@@ -219,6 +222,9 @@ public:
for(node_t* node : _tree.leaves()) {
if(node->getParticleContainer()->size() > 0) {
for(node_t* w_item : node->W) {
if(w_item->is_leaf() && w_item->getParticleContainer()->size() == 0) {
continue;
}
_kernel.M2P(w_item->getData(), node->getParticleContainer());
}
}
......
......@@ -674,6 +674,9 @@ public:
for(node_t* leaf : _tree.leaves()) {
if(leaf->getParticleContainer()->size() > 0) {
for(node_t* w_item : leaf->W) {
if(w_item->is_leaf() && w_item->getParticleContainer()->size() == 0) {
continue;
}
char* w_dep = get_dependency<dep_t::L>(w_item);(void)w_dep;
char* ps_dep = get_dependency<dep_t::P_s>(leaf);(void)ps_dep;
......@@ -731,6 +734,10 @@ public:
for(node_t* leaf : _tree.leaves()) {
if(leaf->getParticleContainer()->size() > 0) {
for(node_t* w_item : leaf->W) {
if(w_item->is_leaf() && w_item->getParticleContainer()->size() == 0) {
continue;
}
char* w_dep = get_dependency<dep_t::M>(w_item); (void)w_dep;
char* pt_dep = get_dependency<dep_t::P_t>(leaf); (void)pt_dep;
......
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