From c0e30fab027d94650f83c2bcb454a10a7d5639ac Mon Sep 17 00:00:00 2001 From: berenger-bramas <berenger-bramas@2616d619-271b-44dc-8df4-d4a8f33a7222> Date: Thu, 2 Feb 2012 09:10:48 +0000 Subject: [PATCH] Change the octree to work from height = 2 to x git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@336 2616d619-271b-44dc-8df4-d4a8f33a7222 --- Src/Containers/FOctree.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Src/Containers/FOctree.hpp b/Src/Containers/FOctree.hpp index 98f95ed8d..250c542fb 100644 --- a/Src/Containers/FOctree.hpp +++ b/Src/Containers/FOctree.hpp @@ -89,11 +89,12 @@ public: height(inHeight) , subHeight(inSubHeight), leafIndex(this->height-1), root(0), boxCenter(inBoxCenter), boxCorner(inBoxCenter - (inBoxWidth/2)), boxWidth(inBoxWidth) { + fassert(subHeight <= height - 1, "Subheight cannot be greater than height", __LINE__, __FILE__ ); // Does we only need one suboctree? - if(subHeight >= height){ + if(subHeight == height - 1){ root = new FSubOctreeWithLeafs< ParticleClass, CellClass , ContainerClass, LeafClass>(0, 0, this->subHeight, 1); } - else{ + else {// if(subHeight < height - 1) root = new FSubOctree< ParticleClass, CellClass , ContainerClass, LeafClass>(0, 0, this->subHeight, 1); } -- GitLab