Commit 871b108c authored by BRAMAS Berenger's avatar BRAMAS Berenger

use the treeheight instead of a variable with a wrong name

parent 8be93c3b
......@@ -415,8 +415,6 @@ protected:
};
LeafData* const leafsDataArray = new LeafData[this->leafsNumber];
const int LeafIndex = OctreeHeight - 1;
int startPosAtShape[SizeShape];
startPosAtShape[0] = 0;
for(int idxShape = 1 ; idxShape < SizeShape ; ++idxShape){
......@@ -479,7 +477,7 @@ protected:
if(p2pEnabled){
// need the current particles and neighbors particles
FLOG(if(!omp_get_thread_num()) computationCounterP2P.tic());
const int counter = tree->getLeafsNeighbors(neighbors, neighborPositions, currentIter.cell->getCoordinate(), LeafIndex);
const int counter = tree->getLeafsNeighbors(neighbors, neighborPositions, currentIter.cell->getCoordinate(), OctreeHeight-1);
myThreadkernels.P2P(currentIter.cell->getCoordinate(), currentIter.targets,
currentIter.sources, neighbors, neighborPositions, counter);
FLOG(if(!omp_get_thread_num()) computationCounterP2P.tac());
......
......@@ -381,7 +381,7 @@ protected:
const FSize nbPartInLeaf = octreeIterator.getCurrentListTargets()->getNbParticles();
workloadBuffer[positionToWork].amountOfWork = nbPartInLeaf*nbPartInLeaf;
ContainerClass* neighbors[27];
tree->getLeafsNeighbors(neighbors, octreeIterator.getCurrentGlobalCoordinate(), LeafIndex);
tree->getLeafsNeighbors(neighbors, octreeIterator.getCurrentGlobalCoordinate(), OctreeHeight-1);
for(int idxNeigh = 0 ; idxNeigh < 27 ; ++idxNeigh){
if(neighbors[idxNeigh]){
workloadBuffer[positionToWork].amountOfWork +=
......@@ -657,8 +657,6 @@ protected:
FLOG(FTic computationCounter);
FLOG(FTic computationCounterP2P);
const int LeafIndex = OctreeHeight - 1;
#pragma omp parallel
{
FLOG(if(!omp_get_thread_num()) computationCounter.tic());
......@@ -674,7 +672,7 @@ protected:
LeafData& currentIter = leafsDataArray[idxLeafs];
// need the current particles and neighbors particles
FLOG(if(!omp_get_thread_num()) computationCounterP2P.tic());
const int counter = tree->getLeafsNeighbors(neighbors, neighborPositions, currentIter.coord, LeafIndex);
const int counter = tree->getLeafsNeighbors(neighbors, neighborPositions, currentIter.coord, OctreeHeight-1);
myThreadkernels.P2P(currentIter.coord, currentIter.targets,
currentIter.sources, neighbors, neighborPositions, counter);
FLOG(if(!omp_get_thread_num()) computationCounterP2P.tac());
......
......@@ -1233,7 +1233,6 @@ protected:
OctreeClass otherP2Ptree( tree->getHeight(), tree->getSubHeight(), tree->getBoxWidth(), tree->getBoxCenter() );
// init
const int LeafIndex = OctreeHeight - 1;
const int SizeShape = P2PExclusionClass::SizeShape;
int shapeLeaf[SizeShape];
......@@ -1459,7 +1458,7 @@ protected:
}
if(p2pEnabled){
// need the current particles and neighbors particles
const int counter = tree->getLeafsNeighbors(neighbors, neighborPositions, currentIter.coord, LeafIndex);
const int counter = tree->getLeafsNeighbors(neighbors, neighborPositions, currentIter.coord, OctreeHeight-1);
myThreadkernels->P2P( currentIter.coord,currentIter.targets,
currentIter.sources, neighbors, neighborPositions, counter);
}
......
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