Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 4f98d4a3 authored by Quentin Khan's avatar Quentin Khan
Browse files

test_FCountKernel: code refactor

Make TestNodeData inherit from FCountKernel's TestCountNodeData.
Set tree height as a constexpr variable instead of a literal.
parent cfff9f9b
No related branches found
No related tags found
No related merge requests found
......@@ -38,19 +38,15 @@
* local development represent.
*/
template<typename FReal, typename Container>
struct TestNodeData : FBasicCell, FSimpleLeaf<FReal, Container> {
/// Multipole equivalent particle count
std::size_t up = 0;
/// Local development particle interaction count
std::size_t down = 0;
};
struct TestNodeData : FBasicCell, FSimpleLeaf<FReal, Container>, TestCountNodeData
{};
int main() {
/// Floating point representation
using FReal = double;
/// Space dimension
constexpr std::size_t Dim = 3; // FTree and FFmmAlgorithm are stuck with this
constexpr std::size_t Dim = 3; // FOctree and FFmmAlgorithm are stuck with this
/// Particle type
using particle_t = TestCountParticle<FReal, Dim>;
/// Particle container type
......@@ -65,11 +61,14 @@ int main() {
using fmm_algo_t = FFmmAlgorithm<tree_t, node_data_t, particle_container_t, kernel_t, node_data_t>;
// Load the test particle distribution
constexpr std::size_t Height = 5;
// Load the test particle distribution
FFmaGenericLoader<FReal> loader("test.fma");
// Tree setup
tree_t tree(5,2, loader.getBoxWidth(), loader.getCenterOfBox());
tree_t tree(Height,2, loader.getBoxWidth(), loader.getCenterOfBox());
// Particle position list
std::vector<particle_t::position_t> position_vect;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment