Commit 6dc92ced authored by BRAMAS Berenger's avatar BRAMAS Berenger

use FLOG instead of FDEBUG

parent 8ae58287
...@@ -126,7 +126,7 @@ public: ...@@ -126,7 +126,7 @@ public:
virtual void P2PRemote(const FTreeCoordinate& /*inLeafPosition*/, virtual void P2PRemote(const FTreeCoordinate& /*inLeafPosition*/,
ContainerClass* const FRestrict /*targets*/, const ContainerClass* const FRestrict /*sources*/, ContainerClass* const FRestrict /*targets*/, const ContainerClass* const FRestrict /*sources*/,
ContainerClass* const /*directNeighborsParticles*/[27], const int /*size*/) { ContainerClass* const /*directNeighborsParticles*/[27], const int /*size*/) {
FDEBUG( FDebug::Controller.write("Warning, P2P remote is used but not implemented!").write(FDebug::Flush) ); FLOG( FDebug::Controller.write("Warning, P2P remote is used but not implemented!").write(FDebug::Flush) );
} }
}; };
......
...@@ -42,7 +42,7 @@ public: ...@@ -42,7 +42,7 @@ public:
*/ */
template<typename... Args> template<typename... Args>
void push(const FPoint& /*inParticlePosition*/, Args ... /*args*/){ void push(const FPoint& /*inParticlePosition*/, Args ... /*args*/){
FDEBUG( FDebug::Controller.write("Warning, push is not implemented!").write(FDebug::Flush) ); FLOG( FDebug::Controller.write("Warning, push is not implemented!").write(FDebug::Flush) );
} }
/** /**
......
...@@ -45,7 +45,7 @@ public: ...@@ -45,7 +45,7 @@ public:
*/ */
template<typename... Args> template<typename... Args>
void push(const FPoint& /*inParticlePosition*/, Args ... /*args*/){ void push(const FPoint& /*inParticlePosition*/, Args ... /*args*/){
FDEBUG( FDebug::Controller.write("Warning, push is not implemented!").write(FDebug::Flush) ); FLOG( FDebug::Controller.write("Warning, push is not implemented!").write(FDebug::Flush) );
} }
}; };
......
...@@ -93,7 +93,7 @@ class FOctree : protected FAssertable, public FNoCopyable { ...@@ -93,7 +93,7 @@ class FOctree : protected FAssertable, public FNoCopyable {
* @return the box num at the leaf level that contains inRelativePosition * @return the box num at the leaf level that contains inRelativePosition
*/ */
int getTreeCoordinate(const FReal inRelativePosition) const { int getTreeCoordinate(const FReal inRelativePosition) const {
FDEBUG( fassert(inRelativePosition >= 0 && inRelativePosition < this->boxWidth, "Particle out of box", __LINE__, __FILE__) ); FLOG( fassert(inRelativePosition >= 0 && inRelativePosition < this->boxWidth, "Particle out of box", __LINE__, __FILE__) );
const FReal indexFReal = inRelativePosition / this->boxWidthAtLevel[this->leafIndex]; const FReal indexFReal = inRelativePosition / this->boxWidthAtLevel[this->leafIndex];
/*const int index = int(FMath::dfloor(indexFReal)); /*const int index = int(FMath::dfloor(indexFReal));
if( index && FMath::LookEqual(inRelativePosition, this->boxWidthAtLevel[this->leafIndex] * FReal(index) ) ){ if( index && FMath::LookEqual(inRelativePosition, this->boxWidthAtLevel[this->leafIndex] * FReal(index) ) ){
......
...@@ -59,7 +59,7 @@ public: ...@@ -59,7 +59,7 @@ public:
fassert(tree, "tree cannot be null", __LINE__, __FILE__); fassert(tree, "tree cannot be null", __LINE__, __FILE__);
fassert(kernels, "kernels cannot be null", __LINE__, __FILE__); fassert(kernels, "kernels cannot be null", __LINE__, __FILE__);
FDEBUG(FDebug::Controller << "FFmmAlgorithm\n"); FLOG(FDebug::Controller << "FFmmAlgorithm\n");
} }
/** Default destructor */ /** Default destructor */
...@@ -92,9 +92,9 @@ private: ...@@ -92,9 +92,9 @@ private:
/** P2M */ /** P2M */
void bottomPass(){ void bottomPass(){
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
FDEBUG( FDebug::Controller.write("\tStart Bottom Pass\n").write(FDebug::Flush) ); FLOG( FDebug::Controller.write("\tStart Bottom Pass\n").write(FDebug::Flush) );
FDEBUG(FTic counterTime); FLOG(FTic counterTime);
FDEBUG(FTic computationCounter); FLOG(FTic computationCounter);
typename OctreeClass::Iterator octreeIterator(tree); typename OctreeClass::Iterator octreeIterator(tree);
...@@ -103,13 +103,13 @@ private: ...@@ -103,13 +103,13 @@ private:
do{ do{
// We need the current cell that represent the leaf // We need the current cell that represent the leaf
// and the list of particles // and the list of particles
FDEBUG(computationCounter.tic()); FLOG(computationCounter.tic());
kernels->P2M( octreeIterator.getCurrentCell() , octreeIterator.getCurrentListSrc()); kernels->P2M( octreeIterator.getCurrentCell() , octreeIterator.getCurrentListSrc());
FDEBUG(computationCounter.tac()); FLOG(computationCounter.tac());
} while(octreeIterator.moveRight()); } while(octreeIterator.moveRight());
FDEBUG( FDebug::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" ); FLOG( FDebug::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" );
FDEBUG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" );
} }
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
...@@ -119,9 +119,9 @@ private: ...@@ -119,9 +119,9 @@ private:
/** M2M */ /** M2M */
void upwardPass(){ void upwardPass(){
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
FDEBUG( FDebug::Controller.write("\tStart Upward Pass\n").write(FDebug::Flush); ); FLOG( FDebug::Controller.write("\tStart Upward Pass\n").write(FDebug::Flush); );
FDEBUG(FTic counterTime); FLOG(FTic counterTime);
FDEBUG(FTic computationCounter); FLOG(FTic computationCounter);
// Start from leal level - 1 // Start from leal level - 1
typename OctreeClass::Iterator octreeIterator(tree); typename OctreeClass::Iterator octreeIterator(tree);
...@@ -132,26 +132,26 @@ private: ...@@ -132,26 +132,26 @@ private:
// for each levels // for each levels
for(int idxLevel = OctreeHeight - 2 ; idxLevel > 1 ; --idxLevel ){ for(int idxLevel = OctreeHeight - 2 ; idxLevel > 1 ; --idxLevel ){
FDEBUG(FTic counterTimeLevel); FLOG(FTic counterTimeLevel);
// for each cells // for each cells
do{ do{
// We need the current cell and the child // We need the current cell and the child
// child is an array (of 8 child) that may be null // child is an array (of 8 child) that may be null
FDEBUG(computationCounter.tic()); FLOG(computationCounter.tic());
kernels->M2M( octreeIterator.getCurrentCell() , octreeIterator.getCurrentChild(), idxLevel); kernels->M2M( octreeIterator.getCurrentCell() , octreeIterator.getCurrentChild(), idxLevel);
FDEBUG(computationCounter.tac()); FLOG(computationCounter.tac());
} while(octreeIterator.moveRight()); } while(octreeIterator.moveRight());
avoidGotoLeftIterator.moveUp(); avoidGotoLeftIterator.moveUp();
octreeIterator = avoidGotoLeftIterator; octreeIterator = avoidGotoLeftIterator;
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
} }
FDEBUG( FDebug::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" ); FLOG( FDebug::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" );
FDEBUG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" );
} }
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
...@@ -162,9 +162,9 @@ private: ...@@ -162,9 +162,9 @@ private:
void transferPass(){ void transferPass(){
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
FDEBUG( FDebug::Controller.write("\tStart Downward Pass (M2L)\n").write(FDebug::Flush); ); FLOG( FDebug::Controller.write("\tStart Downward Pass (M2L)\n").write(FDebug::Flush); );
FDEBUG(FTic counterTime); FLOG(FTic counterTime);
FDEBUG(FTic computationCounter); FLOG(FTic computationCounter);
typename OctreeClass::Iterator octreeIterator(tree); typename OctreeClass::Iterator octreeIterator(tree);
octreeIterator.moveDown(); octreeIterator.moveDown();
...@@ -175,27 +175,27 @@ private: ...@@ -175,27 +175,27 @@ private:
// for each levels // for each levels
for(int idxLevel = 2 ; idxLevel < OctreeHeight ; ++idxLevel ){ for(int idxLevel = 2 ; idxLevel < OctreeHeight ; ++idxLevel ){
FDEBUG(FTic counterTimeLevel); FLOG(FTic counterTimeLevel);
// for each cells // for each cells
do{ do{
const int counter = tree->getInteractionNeighbors(neighbors, octreeIterator.getCurrentGlobalCoordinate(), idxLevel); const int counter = tree->getInteractionNeighbors(neighbors, octreeIterator.getCurrentGlobalCoordinate(), idxLevel);
FDEBUG(computationCounter.tic()); FLOG(computationCounter.tic());
if(counter) kernels->M2L( octreeIterator.getCurrentCell() , neighbors, counter, idxLevel); if(counter) kernels->M2L( octreeIterator.getCurrentCell() , neighbors, counter, idxLevel);
FDEBUG(computationCounter.tac()); FLOG(computationCounter.tac());
} while(octreeIterator.moveRight()); } while(octreeIterator.moveRight());
FDEBUG(computationCounter.tic()); FLOG(computationCounter.tic());
kernels->finishedLevelM2L(idxLevel); kernels->finishedLevelM2L(idxLevel);
FDEBUG(computationCounter.tac()); FLOG(computationCounter.tac());
avoidGotoLeftIterator.moveDown(); avoidGotoLeftIterator.moveDown();
octreeIterator = avoidGotoLeftIterator; octreeIterator = avoidGotoLeftIterator;
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
} }
FDEBUG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); FLOG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" );
FDEBUG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" );
} }
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
...@@ -205,9 +205,9 @@ private: ...@@ -205,9 +205,9 @@ private:
/** L2L */ /** L2L */
void downardPass(){ void downardPass(){
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
FDEBUG( FDebug::Controller.write("\tStart Downward Pass (L2L)\n").write(FDebug::Flush); ); FLOG( FDebug::Controller.write("\tStart Downward Pass (L2L)\n").write(FDebug::Flush); );
FDEBUG(FTic counterTime); FLOG(FTic counterTime);
FDEBUG(FTic computationCounter ); FLOG(FTic computationCounter );
typename OctreeClass::Iterator octreeIterator(tree); typename OctreeClass::Iterator octreeIterator(tree);
octreeIterator.moveDown(); octreeIterator.moveDown();
...@@ -217,23 +217,23 @@ private: ...@@ -217,23 +217,23 @@ private:
const int heightMinusOne = OctreeHeight - 1; const int heightMinusOne = OctreeHeight - 1;
// for each levels exepted leaf level // for each levels exepted leaf level
for(int idxLevel = 2 ; idxLevel < heightMinusOne ; ++idxLevel ){ for(int idxLevel = 2 ; idxLevel < heightMinusOne ; ++idxLevel ){
FDEBUG(FTic counterTimeLevel); FLOG(FTic counterTimeLevel);
// for each cells // for each cells
do{ do{
FDEBUG(computationCounter.tic()); FLOG(computationCounter.tic());
kernels->L2L( octreeIterator.getCurrentCell() , octreeIterator.getCurrentChild(), idxLevel); kernels->L2L( octreeIterator.getCurrentCell() , octreeIterator.getCurrentChild(), idxLevel);
FDEBUG(computationCounter.tac()); FLOG(computationCounter.tac());
} while(octreeIterator.moveRight()); } while(octreeIterator.moveRight());
avoidGotoLeftIterator.moveDown(); avoidGotoLeftIterator.moveDown();
octreeIterator = avoidGotoLeftIterator; octreeIterator = avoidGotoLeftIterator;
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
} }
FDEBUG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); FLOG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" );
FDEBUG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" );
} }
...@@ -245,10 +245,10 @@ private: ...@@ -245,10 +245,10 @@ private:
/** P2P */ /** P2P */
void directPass(){ void directPass(){
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
FDEBUG( FDebug::Controller.write("\tStart Direct Pass\n").write(FDebug::Flush); ); FLOG( FDebug::Controller.write("\tStart Direct Pass\n").write(FDebug::Flush); );
FDEBUG(FTic counterTime); FLOG(FTic counterTime);
FDEBUG(FTic computationCounterL2P); FLOG(FTic computationCounterL2P);
FDEBUG(FTic computationCounterP2P); FLOG(FTic computationCounterP2P);
const int heightMinusOne = OctreeHeight - 1; const int heightMinusOne = OctreeHeight - 1;
...@@ -258,21 +258,21 @@ private: ...@@ -258,21 +258,21 @@ private:
ContainerClass* neighbors[27]; ContainerClass* neighbors[27];
// for each leafs // for each leafs
do{ do{
FDEBUG(computationCounterL2P.tic()); FLOG(computationCounterL2P.tic());
kernels->L2P(octreeIterator.getCurrentCell(), octreeIterator.getCurrentListTargets()); kernels->L2P(octreeIterator.getCurrentCell(), octreeIterator.getCurrentListTargets());
FDEBUG(computationCounterL2P.tac()); FLOG(computationCounterL2P.tac());
// need the current particles and neighbors particles // need the current particles and neighbors particles
const int counter = tree->getLeafsNeighbors(neighbors, octreeIterator.getCurrentGlobalCoordinate(),heightMinusOne); const int counter = tree->getLeafsNeighbors(neighbors, octreeIterator.getCurrentGlobalCoordinate(),heightMinusOne);
FDEBUG(computationCounterP2P.tic()); FLOG(computationCounterP2P.tic());
kernels->P2P(octreeIterator.getCurrentGlobalCoordinate(),octreeIterator.getCurrentListTargets(), kernels->P2P(octreeIterator.getCurrentGlobalCoordinate(),octreeIterator.getCurrentListTargets(),
octreeIterator.getCurrentListSrc(), neighbors, counter); octreeIterator.getCurrentListSrc(), neighbors, counter);
FDEBUG(computationCounterP2P.tac()); FLOG(computationCounterP2P.tac());
} while(octreeIterator.moveRight()); } while(octreeIterator.moveRight());
FDEBUG( FDebug::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); FLOG( FDebug::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.tacAndElapsed() << "s)\n" );
FDEBUG( FDebug::Controller << "\t\t Computation L2P : " << computationCounterL2P.cumulated() << " s\n" ); FLOG( FDebug::Controller << "\t\t Computation L2P : " << computationCounterL2P.cumulated() << " s\n" );
FDEBUG( FDebug::Controller << "\t\t Computation P2P : " << computationCounterP2P.cumulated() << " s\n" ); FLOG( FDebug::Controller << "\t\t Computation P2P : " << computationCounterP2P.cumulated() << " s\n" );
} }
......
...@@ -69,7 +69,7 @@ public: ...@@ -69,7 +69,7 @@ public:
fassert(tree, "tree cannot be null", __LINE__, __FILE__); fassert(tree, "tree cannot be null", __LINE__, __FILE__);
fassert(-1 <= inUpperLevel, "inUpperLevel cannot be < -1", __LINE__, __FILE__); fassert(-1 <= inUpperLevel, "inUpperLevel cannot be < -1", __LINE__, __FILE__);
FDEBUG(FDebug::Controller << "FFmmAlgorithmPeriodic\n"); FLOG(FDebug::Controller << "FFmmAlgorithmPeriodic\n");
} }
/** Default destructor */ /** Default destructor */
...@@ -111,9 +111,9 @@ public: ...@@ -111,9 +111,9 @@ public:
/** P2M */ /** P2M */
void bottomPass(){ void bottomPass(){
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
FDEBUG( FDebug::Controller.write("\tStart Bottom Pass\n").write(FDebug::Flush) ); FLOG( FDebug::Controller.write("\tStart Bottom Pass\n").write(FDebug::Flush) );
FDEBUG(FTic counterTime); FLOG(FTic counterTime);
FDEBUG(FTic computationCounter); FLOG(FTic computationCounter);
typename OctreeClass::Iterator octreeIterator(tree); typename OctreeClass::Iterator octreeIterator(tree);
...@@ -122,13 +122,13 @@ public: ...@@ -122,13 +122,13 @@ public:
do{ do{
// We need the current cell that represent the leaf // We need the current cell that represent the leaf
// and the list of particles // and the list of particles
FDEBUG(computationCounter.tic()); FLOG(computationCounter.tic());
kernels->P2M( octreeIterator.getCurrentCell() , octreeIterator.getCurrentListSrc()); kernels->P2M( octreeIterator.getCurrentCell() , octreeIterator.getCurrentListSrc());
FDEBUG(computationCounter.tac()); FLOG(computationCounter.tac());
} while(octreeIterator.moveRight()); } while(octreeIterator.moveRight());
FDEBUG( FDebug::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" ); FLOG( FDebug::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" );
FDEBUG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" );
} }
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
...@@ -138,9 +138,9 @@ public: ...@@ -138,9 +138,9 @@ public:
/** M2M */ /** M2M */
void upwardPass(){ void upwardPass(){
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
FDEBUG( FDebug::Controller.write("\tStart Upward Pass\n").write(FDebug::Flush); ); FLOG( FDebug::Controller.write("\tStart Upward Pass\n").write(FDebug::Flush); );
FDEBUG(FTic counterTime); FLOG(FTic counterTime);
FDEBUG(FTic computationCounter); FLOG(FTic computationCounter);
// Start from leal level - 1 // Start from leal level - 1
typename OctreeClass::Iterator octreeIterator(tree); typename OctreeClass::Iterator octreeIterator(tree);
...@@ -151,25 +151,25 @@ public: ...@@ -151,25 +151,25 @@ public:
// for each levels // for each levels
for(int idxLevel = OctreeHeight - 2 ; idxLevel > 0 ; --idxLevel ){ for(int idxLevel = OctreeHeight - 2 ; idxLevel > 0 ; --idxLevel ){
FDEBUG(FTic counterTimeLevel); FLOG(FTic counterTimeLevel);
const int fackLevel = idxLevel + offsetRealTree; const int fackLevel = idxLevel + offsetRealTree;
// for each cells // for each cells
do{ do{
// We need the current cell and the child // We need the current cell and the child
// child is an array (of 8 child) that may be null // child is an array (of 8 child) that may be null
FDEBUG(computationCounter.tic()); FLOG(computationCounter.tic());
kernels->M2M( octreeIterator.getCurrentCell() , octreeIterator.getCurrentChild(), fackLevel); kernels->M2M( octreeIterator.getCurrentCell() , octreeIterator.getCurrentChild(), fackLevel);
FDEBUG(computationCounter.tac()); FLOG(computationCounter.tac());
} while(octreeIterator.moveRight()); } while(octreeIterator.moveRight());
avoidGotoLeftIterator.moveUp(); avoidGotoLeftIterator.moveUp();
octreeIterator = avoidGotoLeftIterator;// equal octreeIterator.moveUp(); octreeIterator.gotoLeft(); octreeIterator = avoidGotoLeftIterator;// equal octreeIterator.moveUp(); octreeIterator.gotoLeft();
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << "(" << fackLevel << ") = " << counterTimeLevel.tacAndElapsed() << "s\n" ); FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << "(" << fackLevel << ") = " << counterTimeLevel.tacAndElapsed() << "s\n" );
} }
FDEBUG( FDebug::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" ); FLOG( FDebug::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" );
FDEBUG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" );
} }
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
...@@ -180,9 +180,9 @@ public: ...@@ -180,9 +180,9 @@ public:
void transferPass(){ void transferPass(){
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
FDEBUG( FDebug::Controller.write("\tStart Downward Pass (M2L)\n").write(FDebug::Flush); ); FLOG( FDebug::Controller.write("\tStart Downward Pass (M2L)\n").write(FDebug::Flush); );
FDEBUG(FTic counterTime); FLOG(FTic counterTime);
FDEBUG(FTic computationCounter); FLOG(FTic computationCounter);
typename OctreeClass::Iterator octreeIterator(tree); typename OctreeClass::Iterator octreeIterator(tree);
typename OctreeClass::Iterator avoidGotoLeftIterator(octreeIterator); typename OctreeClass::Iterator avoidGotoLeftIterator(octreeIterator);
...@@ -191,25 +191,25 @@ public: ...@@ -191,25 +191,25 @@ public:
// for each levels // for each levels
for(int idxLevel = 1 ; idxLevel < OctreeHeight ; ++idxLevel ){ for(int idxLevel = 1 ; idxLevel < OctreeHeight ; ++idxLevel ){
FDEBUG(FTic counterTimeLevel); FLOG(FTic counterTimeLevel);
const int fackLevel = idxLevel + offsetRealTree; const int fackLevel = idxLevel + offsetRealTree;
// for each cells // for each cells
do{ do{
const int counter = tree->getPeriodicInteractionNeighbors(neighbors, octreeIterator.getCurrentGlobalCoordinate(), idxLevel, periodicDirections); const int counter = tree->getPeriodicInteractionNeighbors(neighbors, octreeIterator.getCurrentGlobalCoordinate(), idxLevel, periodicDirections);
FDEBUG(computationCounter.tic()); FLOG(computationCounter.tic());
if(counter) kernels->M2L( octreeIterator.getCurrentCell() , neighbors, counter, fackLevel); if(counter) kernels->M2L( octreeIterator.getCurrentCell() , neighbors, counter, fackLevel);
FDEBUG(computationCounter.tac()); FLOG(computationCounter.tac());
} while(octreeIterator.moveRight()); } while(octreeIterator.moveRight());
avoidGotoLeftIterator.moveDown(); avoidGotoLeftIterator.moveDown();
octreeIterator = avoidGotoLeftIterator; octreeIterator = avoidGotoLeftIterator;
FDEBUG(computationCounter.tic()); FLOG(computationCounter.tic());
kernels->finishedLevelM2L(fackLevel); kernels->finishedLevelM2L(fackLevel);
FDEBUG(computationCounter.tac()); FLOG(computationCounter.tac());
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << "(" << fackLevel << ") = " << counterTimeLevel.tacAndElapsed() << "s\n" ); FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << "(" << fackLevel << ") = " << counterTimeLevel.tacAndElapsed() << "s\n" );
} }
FDEBUG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); FLOG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" );
FDEBUG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" );
} }
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
...@@ -219,9 +219,9 @@ public: ...@@ -219,9 +219,9 @@ public:
void downardPass(){ // second L2L void downardPass(){ // second L2L
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
FDEBUG( FDebug::Controller.write("\tStart Downward Pass (L2L)\n").write(FDebug::Flush); ); FLOG( FDebug::Controller.write("\tStart Downward Pass (L2L)\n").write(FDebug::Flush); );
FDEBUG(FTic counterTime); FLOG(FTic counterTime);
FDEBUG(FTic computationCounter ); FLOG(FTic computationCounter );
typename OctreeClass::Iterator octreeIterator(tree); typename OctreeClass::Iterator octreeIterator(tree);
typename OctreeClass::Iterator avoidGotoLeftIterator(octreeIterator); typename OctreeClass::Iterator avoidGotoLeftIterator(octreeIterator);
...@@ -229,23 +229,23 @@ public: ...@@ -229,23 +229,23 @@ public:
const int heightMinusOne = OctreeHeight - 1; const int heightMinusOne = OctreeHeight - 1;
// for each levels exepted leaf level // for each levels exepted leaf level
for(int idxLevel = 1 ; idxLevel < heightMinusOne ; ++idxLevel ){ for(int idxLevel = 1 ; idxLevel < heightMinusOne ; ++idxLevel ){
FDEBUG(FTic counterTimeLevel); FLOG(FTic counterTimeLevel);
const int fackLevel = idxLevel + offsetRealTree; const int fackLevel = idxLevel + offsetRealTree;
// for each cells // for each cells
do{ do{
FDEBUG(computationCounter.tic()); FLOG(computationCounter.tic());
kernels->L2L( octreeIterator.getCurrentCell() , octreeIterator.getCurrentChild(), fackLevel); kernels->L2L( octreeIterator.getCurrentCell() , octreeIterator.getCurrentChild(), fackLevel);
FDEBUG(computationCounter.tac()); FLOG(computationCounter.tac());
} while(octreeIterator.moveRight()); } while(octreeIterator.moveRight());
avoidGotoLeftIterator.moveDown(); avoidGotoLeftIterator.moveDown();
octreeIterator = avoidGotoLeftIterator; octreeIterator = avoidGotoLeftIterator;
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << "(" << fackLevel << ") = " << counterTimeLevel.tacAndElapsed() << "s\n" ); FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << "(" << fackLevel << ") = " << counterTimeLevel.tacAndElapsed() << "s\n" );
} }
FDEBUG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); FLOG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" );
FDEBUG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" );
} }
...@@ -257,10 +257,10 @@ public: ...@@ -257,10 +257,10 @@ public:
/** P2P */ /** P2P */
void directPass(){ void directPass(){
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );