Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c0e30fab authored by berenger-bramas's avatar berenger-bramas
Browse files

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
parent 4d1a1428
No related branches found
No related tags found
No related merge requests found
...@@ -89,11 +89,12 @@ public: ...@@ -89,11 +89,12 @@ public:
height(inHeight) , subHeight(inSubHeight), leafIndex(this->height-1), height(inHeight) , subHeight(inSubHeight), leafIndex(this->height-1),
root(0), boxCenter(inBoxCenter), boxCorner(inBoxCenter - (inBoxWidth/2)), boxWidth(inBoxWidth) 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? // 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); 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); root = new FSubOctree< ParticleClass, CellClass , ContainerClass, LeafClass>(0, 0, this->subHeight, 1);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment