Commit d6a92cbc authored by Quentin Khan's avatar Quentin Khan

FAdaptiveSequential: skip M2L from and to empty leaves

parent 95d12fb5
......@@ -154,17 +154,25 @@ public:
std::vector<int> v_item_indices;
for(node_t& node : _tree.in_order_walk()) {
if(node.is_leaf() && node.getParticleContainer()->size() == 0) {
continue;
}
v_item_data_list.clear();
v_item_indices.clear();
// Needed to compute offset between boxes
for(node_t* v_item : node.V) {
if(v_item->is_leaf()
&& v_item->getParticleContainer()->size() == 0) {
continue;
}
v_item_indices.push_back(compute_box_offset_index(&node, v_item, 3));
v_item_data_list.push_back(v_item->getData());
// Call kernel M2L operator
}
_kernel.M2L(node.getData(), v_item_data_list.data(), v_item_indices.data(), static_cast<int>(node.V.size()), static_cast<int>(node.getDepth()));
// Call kernel M2L operator
_kernel.M2L(node.getData(), v_item_data_list.data(), v_item_indices.data(), static_cast<int>(v_item_data_list.size()), static_cast<int>(node.getDepth()));
}
}
......
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