From a7b3bb6cfe02e39d09f374a151d4184a1d4d81cd Mon Sep 17 00:00:00 2001
From: Quentin Khan <quentin.khan@inria.fr>
Date: Mon, 8 Aug 2016 17:01:04 +0200
Subject: [PATCH] PerfTest: create tree up to given depth before inserting
 particles

---
 Tests/noDist/PerfTest/Descriptors.hpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Tests/noDist/PerfTest/Descriptors.hpp b/Tests/noDist/PerfTest/Descriptors.hpp
index bfbb96aa0..5003fc9a9 100644
--- a/Tests/noDist/PerfTest/Descriptors.hpp
+++ b/Tests/noDist/PerfTest/Descriptors.hpp
@@ -241,6 +241,7 @@ struct adaptive_tree_descriptor {
         std::unique_ptr<tree_t> build(const FPerfTestParams& params, loader_t& loader) {
             auto tree = std::make_unique<tree_t>(typename tree_t::box_t{loader.getBoxWidth(), loader.getCenterOfBox()});
             tree->leaf_max_particle_count(params.adaptive_density);
+            tree->root()->split_to_height(params.treeHeight);
             return tree;
         }
     };
@@ -248,6 +249,7 @@ struct adaptive_tree_descriptor {
     template<typename tree_t>
     static void info(FPerfTestParams& params, const tree_t& tree) {
         params.json["config"]["tree"]["height"] = tree.height();
+        params.json["config"]["tree"]["initial height"] = params.treeHeight;
         params.json["config"]["tree"]["leaf density"] = tree.leaf_max_particle_count();
 
         std::size_t min = std::numeric_limits<std::size_t>::max(), max = 0;
-- 
GitLab