Commit ddf375fa authored by COULAUD Olivier's avatar COULAUD Olivier
Browse files

Sate p2P interaction

parent d370006e
......@@ -758,8 +758,21 @@ namespace scalfmm::tree
const VectorMortonIdx& local_morton_idx,
const MortonDistribution& leaves_distrib)
{
auto leaf_level = tree.leaf_level();
VectorMortonIdx outsideIndex_to_add();
// leaf level update only P2P ???
// component::for_each(std::get<0>(tree.begin()), std::get<0>(tree.end()), [this](auto& group) {
// std::size_t index_in_group{0};
// component::for_each(std::begin(*group), std::end(*group), [&group, &index_in_group,
// this](auto& leaf) {
// auto& leaf_symbolics = leaf.symbolics();
// leaf_symbolics.interaction_list_exists = false;
// leaf_symbolics.interaction_list_iterators_exists = false;
// component::update_interaction_list(*group, leaf, index_in_group++, m_tree_height - 1);
// component::build_symbolic_interaction_list(operators::impl::tag_p2p t, leaf,
// leaf_level)
// });
// });
return outsideIndex_to_add;
}
......@@ -773,7 +786,6 @@ namespace scalfmm::tree
return outsideIndex_to_add;
}
template<typename OctreeTree, typename VectorMortonIdx>
///
/// \brief merge two sorted vectors
///
......@@ -785,6 +797,7 @@ namespace scalfmm::tree
/// \return the merged vector
/// to the first vector
///
template<typename VectorMortonIdx>
inline VectorMortonIdx merge_unique(VectorMortonIdx& v1, const VectorMortonIdx& v2)
{
VectorMortonIdx dst;
......@@ -793,6 +806,10 @@ namespace scalfmm::tree
dst.erase(last, dst.end());
return dst;
}
template<typename VectorMortonIdx>
void morton_index_exist(parallel_manager& para, VectorMortonIdx& needed_idx)
{
}
} // namespace distrib
namespace let
......@@ -874,33 +891,9 @@ namespace scalfmm::tree
std::move(distrib::get_m2l_interaction_at_level(para, tree, local_morton_idx, cells_distrib, level));
}
#ifdef TT
std::vector<std::pair<MortonIndex, MortonIndex>> index_particle_distribution =
group_linear_tree.get_index_particle_distribution();
// Get the interaction matrix
// matrix[2][nproc]
// first line for Morton index to Send
// second line for Morton index to Recv
std::vector<std::vector<size_t>> global_matrix_interaction = dstr_grp_tree_builder::get_matrix_interaction(
needed_leaf, index_particle_distribution, group_linear_tree.get_mpi_conf());
// Send and get leaf
// Auto is used to get the block more easly
// it's a std::pair<std::vector<cell_symbolic_block>,std::vector<particle_symbolic_block>>
// block_t is a struct define on FDistributedGroupTreeBuilder.hpp
auto let_block = dstr_grp_tree_builder::send_get_symbolic_block_at_level(
needed_leaf, global_matrix_interaction, *this, level, group_linear_tree.get_mpi_conf());
// free needed leaf
std::vector<MortonIndex>().swap(needed_leaf);
// free interaction matrix
std::vector<std::vector<size_t>>().swap(global_matrix_interaction);
// add the LET block to the tree
tree->add_LET_block(let_block, level);
#endif
/// Look if the morton index really exists in the distributed tree
distrib::morton_index_exist(para, needed_idx);
///
tree.insert_component_at_level(level, needed_idx);
}
//
......
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