Commit e96a9bc5 authored by PIACIBELLO Cyrille's avatar PIACIBELLO Cyrille

Change level given inside init_leaf from Height of the tree to Height of the tree - 1

parent c7481414
......@@ -175,7 +175,7 @@ typedef void (*Callback_apply_on_leaf)(int level, FSize nbParts, const FSize * i
/**
* @brief Callback to initialise data inside the Leaves
* @param level current level of leaves (ie height of the tree)
* @param level current level of leaves (ie height of the tree-1)
* @param nbParts Number of particles inside that leaf"
* @param idxParts array of size nbParts, containing the indices of each parts
* @param morton_index of the current cell
......
......@@ -502,7 +502,7 @@ public:
//Then init leaves
octree->forEachCellLeaf([&](CoreCell * currCell, LeafClass * leaf){
FTreeCoordinate currCoord = currCell->getCoordinate();
int currLevel = octree->getHeight();
int currLevel = octree->getHeight()-1;
MortonIndex currMorton = currCoord.getMortonIndex(currLevel);
double position[3];
position[0] = boxCorner.getX() + currCoord.getX()*boxwidth/double(1<<currLevel);
......
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