Commit 7d5c44b5 authored by Quentin Khan's avatar Quentin Khan

Improve test_FCountKernel

A define is added to choose the adaptive of the uniform tree.
parent f3bf686a
......@@ -35,6 +35,8 @@
#include "FCountKernel.hpp"
#define UNIFORM_TREE
/** \brief Node and leaf data
*
* Holds two members that count the interactions that the node multipole and
......@@ -56,26 +58,31 @@ int main() {
using particle_container_t = FVariadicParticleContainer<particle_t>;
/// Node data type
using node_data_t = TestNodeData<FReal, particle_container_t>;
/// Adaptive tree type
using tree_t = FOctree<FReal, node_data_t, particle_container_t, node_data_t>;
/// Kernel type
using kernel_t = FCountKernel<node_data_t, particle_container_t>;
#ifdef UNIFORM_TREE
/// Uniform tree type
using tree_t = FOctree<FReal, node_data_t, particle_container_t, node_data_t>;
/// FMM algorithm type
using fmm_algo_t = FFmmAlgorithm<tree_t, node_data_t, particle_container_t, kernel_t, node_data_t>;
using a_tree_t = FTree<particle_container_t, node_data_t>;
using a_fmm_algo_t = FAdaptiveTask<a_tree_t, kernel_t>;
constexpr std::size_t Height = 5;
#else
/// Adaptive tree type
using tree_t = FTree<particle_container_t, node_data_t>;
/// FMM algorithm type
using fmm_algo_t = FAdaptiveTask<tree_t, kernel_t>;
#endif
// Load the test particle distribution
FFmaGenericLoader<FReal> loader("test.fma");
// Tree setup
#ifdef UNIFORM_TREE
constexpr std::size_t Height = 5;
tree_t tree(Height,2, loader.getBoxWidth(), loader.getCenterOfBox());
#else
tree_t tree({loader.getBoxWidth(), loader.getCenterOfBox()});
#endif
// Particle position list
std::vector<particle_t::position_t> position_vect;
......
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