Commit 2f73f0e8 authored by BRAMAS Berenger's avatar BRAMAS Berenger

remove warnings and add flag to manage operators

parent 3caff9c3
#ifndef FCORECOMMON_HPP
#define FCORECOMMON_HPP
enum FFmmOperations {
FFmmP2P = (1 << 0),
FFmmP2M = (1 << 1),
FFmmM2M = (1 << 2),
FFmmM2L = (1 << 3),
FFmmL2L = (1 << 4),
FFmmL2P = (1 << 5),
FFmmNearField = FFmmP2P,
FFmmFarField = (FFmmP2M|FFmmM2M|FFmmM2L|FFmmL2L|FFmmL2P),
FFmmNearAndFarFields = (FFmmNearField|FFmmFarField)
};
#endif // FCORECOMMON_HPP
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "../Containers/FOctree.hpp" #include "../Containers/FOctree.hpp"
#include "../Containers/FVector.hpp" #include "../Containers/FVector.hpp"
#include "FCoreCommon.hpp"
/** /**
* @author Berenger Bramas (berenger.bramas@inria.fr) * @author Berenger Bramas (berenger.bramas@inria.fr)
...@@ -69,18 +70,18 @@ public: ...@@ -69,18 +70,18 @@ public:
* To execute the fmm algorithm * To execute the fmm algorithm
* Call this function to run the complete algorithm * Call this function to run the complete algorithm
*/ */
void execute(){ void execute(const unsigned operationsToProceed = FFmmNearAndFarFields){
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
bottomPass(); if(operationsToProceed & FFmmP2M) bottomPass();
upwardPass(); if(operationsToProceed & FFmmM2M) upwardPass();
transferPass(); if(operationsToProceed & FFmmM2L) transferPass();
downardPass(); if(operationsToProceed & FFmmL2L) downardPass();
directPass(); if(operationsToProceed & FFmmP2P || operationsToProceed & FFmmL2P) directPass();
} }
private: private:
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "../Containers/FOctree.hpp" #include "../Containers/FOctree.hpp"
#include "../Containers/FVector.hpp" #include "../Containers/FVector.hpp"
#include "FCoreCommon.hpp"
/** /**
* @author Berenger Bramas (berenger.bramas@inria.fr) * @author Berenger Bramas (berenger.bramas@inria.fr)
...@@ -51,11 +52,6 @@ class FFmmAlgorithmPeriodic : protected FAssertable{ ...@@ -51,11 +52,6 @@ class FFmmAlgorithmPeriodic : protected FAssertable{
const int offsetRealTree; //< nbLevelsAboveRoot GetFackLevel const int offsetRealTree; //< nbLevelsAboveRoot GetFackLevel
const int periodicDirections; const int periodicDirections;
static int GetFackLevel(const int inLevelAboveRequiered){
if( inLevelAboveRequiered == -1 ) return 1;
if( inLevelAboveRequiered == 0 ) return 2;
return inLevelAboveRequiered + 3;
}
public: public:
/** The constructor need the octree and the kernels used for computation /** The constructor need the octree and the kernels used for computation
...@@ -67,7 +63,7 @@ public: ...@@ -67,7 +63,7 @@ public:
*/ */
FFmmAlgorithmPeriodic(OctreeClass* const inTree, const int inUpperLevel = 0, const int inPeriodicDirections = AllDirs) FFmmAlgorithmPeriodic(OctreeClass* const inTree, const int inUpperLevel = 0, const int inPeriodicDirections = AllDirs)
: tree(inTree) , kernels(0), OctreeHeight(tree->getHeight()), : tree(inTree) , kernels(0), OctreeHeight(tree->getHeight()),
nbLevelsAboveRoot(inUpperLevel), offsetRealTree(GetFackLevel(inUpperLevel)), nbLevelsAboveRoot(inUpperLevel), offsetRealTree(inUpperLevel + 3),
periodicDirections(inPeriodicDirections) { periodicDirections(inPeriodicDirections) {
fassert(tree, "tree cannot be null", __LINE__, __FILE__); fassert(tree, "tree cannot be null", __LINE__, __FILE__);
...@@ -88,21 +84,23 @@ public: ...@@ -88,21 +84,23 @@ public:
* To execute the fmm algorithm * To execute the fmm algorithm
* Call this function to run the complete algorithm * Call this function to run the complete algorithm
*/ */
void execute(){ void execute(const unsigned operationsToProceed = FFmmNearAndFarFields){
fassert(kernels, "kernels cannot be null", __LINE__, __FILE__); fassert(kernels, "kernels cannot be null", __LINE__, __FILE__);
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
bottomPass(); if(operationsToProceed & FFmmP2M) bottomPass();
upwardPass(); if(operationsToProceed & FFmmM2M) upwardPass();
transferPass(); if(operationsToProceed & FFmmM2L){
// before downward pass we have to perform the periodicity transferPass();
processPeriodicLevels(); // before downward pass we have to perform the periodicity
processPeriodicLevels();
}
downardPass(); if(operationsToProceed & FFmmL2L) downardPass();
directPass(); if(operationsToProceed & FFmmP2P || operationsToProceed & FFmmL2P) directPass();
} }
...@@ -166,7 +164,7 @@ public: ...@@ -166,7 +164,7 @@ public:
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 << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << "(" << fackLevel << ") = " << counterTimeLevel.tacAndElapsed() << "s\n" );
} }
...@@ -208,7 +206,7 @@ public: ...@@ -208,7 +206,7 @@ public:
FDEBUG(computationCounter.tic()); FDEBUG(computationCounter.tic());
kernels->finishedLevelM2L(fackLevel); kernels->finishedLevelM2L(fackLevel);
FDEBUG(computationCounter.tac()); FDEBUG(computationCounter.tac());
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << "(" << fackLevel << ") = " << counterTimeLevel.tacAndElapsed() << "s\n" );
} }
FDEBUG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); FDEBUG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" );
FDEBUG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); FDEBUG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" );
...@@ -243,7 +241,7 @@ public: ...@@ -243,7 +241,7 @@ public:
avoidGotoLeftIterator.moveDown(); avoidGotoLeftIterator.moveDown();
octreeIterator = avoidGotoLeftIterator; octreeIterator = avoidGotoLeftIterator;
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << "(" << fackLevel << ") = " << counterTimeLevel.tacAndElapsed() << "s\n" );
} }
FDEBUG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); FDEBUG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" );
...@@ -463,8 +461,8 @@ public: ...@@ -463,8 +461,8 @@ public:
* because it contains the theorical periodic box width for the * because it contains the theorical periodic box width for the
* nbLevelsAboveRoot choosen * nbLevelsAboveRoot choosen
*/ */
int theoricalRepetition() const { long long int theoricalRepetition() const {
return nbLevelsAboveRoot == -1 ? 3 : 3 * (1<<(nbLevelsAboveRoot+1)) + 1; return nbLevelsAboveRoot == -1 ? 3 : 3LL * (1LL<<(nbLevelsAboveRoot+1)) + 1LL;
} }
/** To know the number of box repeated in each direction /** To know the number of box repeated in each direction
...@@ -474,7 +472,7 @@ public: ...@@ -474,7 +472,7 @@ public:
* The maxs value are contains between [0;(theoricalRepetition-1 / 2)] * The maxs value are contains between [0;(theoricalRepetition-1 / 2)]
*/ */
void repetitionsIntervals(FTreeCoordinate*const min, FTreeCoordinate*const max) const { void repetitionsIntervals(FTreeCoordinate*const min, FTreeCoordinate*const max) const {
const int halfRepeated = (theoricalRepetition()-1) /2; const int halfRepeated = int((theoricalRepetition()-1)/2);
min->setPosition(-ifDir(DirMinusX,halfRepeated,0),-ifDir(DirMinusY,halfRepeated,0), min->setPosition(-ifDir(DirMinusX,halfRepeated,0),-ifDir(DirMinusY,halfRepeated,0),
-ifDir(DirMinusZ,halfRepeated,0)); -ifDir(DirMinusZ,halfRepeated,0));
max->setPosition(ifDir(DirPlusX,halfRepeated,0),ifDir(DirPlusY,halfRepeated,0), max->setPosition(ifDir(DirPlusX,halfRepeated,0),ifDir(DirPlusY,halfRepeated,0),
...@@ -486,7 +484,7 @@ public: ...@@ -486,7 +484,7 @@ public:
* Each value is between [1;theoricalRepetition] * Each value is between [1;theoricalRepetition]
*/ */
FTreeCoordinate repetitions() const { FTreeCoordinate repetitions() const {
const int halfRepeated = (theoricalRepetition()-1) /2; const int halfRepeated = int((theoricalRepetition()-1)/2);
return FTreeCoordinate(ifDir(DirMinusX,halfRepeated,0) + ifDir(DirPlusX,halfRepeated,0) + 1, return FTreeCoordinate(ifDir(DirMinusX,halfRepeated,0) + ifDir(DirPlusX,halfRepeated,0) + 1,
ifDir(DirMinusY,halfRepeated,0) + ifDir(DirPlusY,halfRepeated,0) + 1, ifDir(DirMinusY,halfRepeated,0) + ifDir(DirPlusY,halfRepeated,0) + 1,
ifDir(DirMinusZ,halfRepeated,0) + ifDir(DirPlusZ,halfRepeated,0) + 1); ifDir(DirMinusZ,halfRepeated,0) + ifDir(DirPlusZ,halfRepeated,0) + 1);
...@@ -511,11 +509,13 @@ public: ...@@ -511,11 +509,13 @@ public:
*/ */
FPoint extendedBoxCenter() const { FPoint extendedBoxCenter() const {
const FReal originalBoxWidth = tree->getBoxWidth(); const FReal originalBoxWidth = tree->getBoxWidth();
const FReal originalBoxWidthDiv2 = originalBoxWidth/2.0;
const FPoint originalBoxCenter = tree->getBoxCenter(); const FPoint originalBoxCenter = tree->getBoxCenter();
const FReal offset = originalBoxWidth * FReal(1<<(offsetRealTree-1)) - originalBoxWidth/FReal(2.0);
return FPoint( originalBoxCenter.getX() + offset, const FReal offset = extendedBoxWidth()/2;
originalBoxCenter.getY() + offset, return FPoint( originalBoxCenter.getX() - originalBoxWidthDiv2 + offset,
originalBoxCenter.getZ() + offset); originalBoxCenter.getY() - originalBoxWidthDiv2 + offset,
originalBoxCenter.getZ() - originalBoxWidthDiv2 + offset);
} }
/** This function has to be used to init the kernel with correct args /** This function has to be used to init the kernel with correct args
...@@ -544,7 +544,7 @@ public: ...@@ -544,7 +544,7 @@ public:
* @return correctValue if testDir is used, else wrongValue * @return correctValue if testDir is used, else wrongValue
*/ */
template <class T> template <class T>
int ifDir(const PeriodicCondition testDir, const T& correctValue, const T& wrongValue) const { const T& ifDir(const PeriodicCondition testDir, const T& correctValue, const T& wrongValue) const {
return (periodicDirections & testDir ? correctValue : wrongValue); return (periodicDirections & testDir ? correctValue : wrongValue);
} }
...@@ -576,7 +576,7 @@ public: ...@@ -576,7 +576,7 @@ public:
// compute the root // compute the root
typename OctreeClass::Iterator octreeIterator(tree); typename OctreeClass::Iterator octreeIterator(tree);
octreeIterator.gotoLeft(); octreeIterator.gotoLeft();
kernels->M2M( &rootUp, octreeIterator.getCurrentBox(), 2); kernels->M2M( &rootUp, octreeIterator.getCurrentBox(), 3);
// build fack M2L vector from -3/+3 x/y/z // build fack M2L vector from -3/+3 x/y/z
const CellClass* neighbors[343]; const CellClass* neighbors[343];
...@@ -594,10 +594,10 @@ public: ...@@ -594,10 +594,10 @@ public:
} }
// compute M2L // compute M2L
CellClass rootDown; CellClass rootDown;
kernels->M2L( &rootDown , neighbors, counter, 2); kernels->M2L( &rootDown , neighbors, counter, 3);
// put result in level 1 // put result in level 1
kernels->L2L( &rootDown, octreeIterator.getCurrentBox(), 2); kernels->L2L( &rootDown, octreeIterator.getCurrentBox(), 3);
FDEBUG( FDebug::Controller << "\tFinished (@Periodic = " << counterTime.tacAndElapsed() << "s)\n" ); FDEBUG( FDebug::Controller << "\tFinished (@Periodic = " << counterTime.tacAndElapsed() << "s)\n" );
return; return;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "../Containers/FOctree.hpp" #include "../Containers/FOctree.hpp"
#include "../Containers/FVector.hpp" #include "../Containers/FVector.hpp"
#include "FCoreCommon.hpp"
/** /**
* @author Berenger Bramas (berenger.bramas@inria.fr) * @author Berenger Bramas (berenger.bramas@inria.fr)
...@@ -82,7 +83,7 @@ public: ...@@ -82,7 +83,7 @@ public:
* To execute the fmm algorithm * To execute the fmm algorithm
* Call this function to run the complete algorithm * Call this function to run the complete algorithm
*/ */
void execute(){ void execute(const unsigned operationsToProceed = FFmmNearAndFarFields){
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
#pragma omp parallel #pragma omp parallel
...@@ -91,22 +92,22 @@ public: ...@@ -91,22 +92,22 @@ public:
{ {
#pragma omp section #pragma omp section
{ {
bottomPass(); if(operationsToProceed & FFmmP2M) bottomPass();
upwardPass(); if(operationsToProceed & FFmmM2M) upwardPass();
transferPass(); if(operationsToProceed & FFmmM2L) transferPass();
downardPass(); if(operationsToProceed & FFmmL2L) downardPass();
} }
#pragma omp section #pragma omp section
{ {
directPass(); if(operationsToProceed & FFmmP2P) directPass();
} }
} }
#pragma omp single #pragma omp single
{ {
L2PPass(); if(operationsToProceed & FFmmL2P) L2PPass();
} }
} }
} }
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "../Containers/FOctree.hpp" #include "../Containers/FOctree.hpp"
#include "../Containers/FVector.hpp" #include "../Containers/FVector.hpp"
#include "FCoreCommon.hpp"
/** /**
* @author Berenger Bramas (berenger.bramas@inria.fr) * @author Berenger Bramas (berenger.bramas@inria.fr)
...@@ -82,18 +83,18 @@ public: ...@@ -82,18 +83,18 @@ public:
* To execute the fmm algorithm * To execute the fmm algorithm
* Call this function to run the complete algorithm * Call this function to run the complete algorithm
*/ */
void execute(){ void execute(const unsigned operationsToProceed = FFmmNearAndFarFields){
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
bottomPass(); if(operationsToProceed & FFmmP2M) bottomPass();
upwardPass(); if(operationsToProceed & FFmmM2M) upwardPass();
transferPass(); if(operationsToProceed & FFmmM2L) transferPass();
downardPass(); if(operationsToProceed & FFmmL2L) downardPass();
directPass(); if(operationsToProceed & FFmmP2P || operationsToProceed & FFmmL2P) directPass();
} }
private: private:
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "../Containers/FOctree.hpp" #include "../Containers/FOctree.hpp"
#include "FCoreCommon.hpp"
#include <omp.h> #include <omp.h>
...@@ -90,7 +91,7 @@ public: ...@@ -90,7 +91,7 @@ public:
* To execute the fmm algorithm * To execute the fmm algorithm
* Call this function to run the complete algorithm * Call this function to run the complete algorithm
*/ */
void execute(){ void execute(const unsigned operationsToProceed = FFmmNearAndFarFields){
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
for(int idxShape = 0 ; idxShape < SizeShape ; ++idxShape){ for(int idxShape = 0 ; idxShape < SizeShape ; ++idxShape){
...@@ -110,15 +111,15 @@ public: ...@@ -110,15 +111,15 @@ public:
iterArray = new typename OctreeClass::Iterator[leafsNumber]; iterArray = new typename OctreeClass::Iterator[leafsNumber];
fassert(iterArray, "iterArray bad alloc", __LINE__, __FILE__); fassert(iterArray, "iterArray bad alloc", __LINE__, __FILE__);
bottomPass(); if(operationsToProceed & FFmmP2M) bottomPass();
upwardPass(); if(operationsToProceed & FFmmM2M) upwardPass();
transferPass(); if(operationsToProceed & FFmmM2L) transferPass();
downardPass(); if(operationsToProceed & FFmmL2L) downardPass();
directPass(); if(operationsToProceed & FFmmP2P || operationsToProceed & FFmmL2P) directPass();
delete [] iterArray; delete [] iterArray;
iterArray = 0; iterArray = 0;
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <omp.h> #include <omp.h>
#include "FCoreCommon.hpp"
/** /**
* @author Berenger Bramas (berenger.bramas@inria.fr) * @author Berenger Bramas (berenger.bramas@inria.fr)
...@@ -142,7 +143,7 @@ public: ...@@ -142,7 +143,7 @@ public:
* To execute the fmm algorithm * To execute the fmm algorithm
* Call this function to run the complete algorithm * Call this function to run the complete algorithm
*/ */
void execute(){ void execute(const unsigned operationsToProceed = FFmmNearAndFarFields){
FTRACE( FTrace::FFunction functionTrace( __FUNCTION__, "Fmm" , __FILE__ , __LINE__ ) ); FTRACE( FTrace::FFunction functionTrace( __FUNCTION__, "Fmm" , __FILE__ , __LINE__ ) );
// Count leaf // Count leaf
...@@ -196,15 +197,15 @@ public: ...@@ -196,15 +197,15 @@ public:
} }
// run; // run;
bottomPass(); if(operationsToProceed & FFmmP2M) bottomPass();
upwardPass(); if(operationsToProceed & FFmmM2M) upwardPass();
transferPass(); if(operationsToProceed & FFmmM2L) transferPass();
downardPass(); if(operationsToProceed & FFmmL2L) downardPass();
directPass(); if(operationsToProceed & FFmmP2P || operationsToProceed & FFmmL2P) directPass();
// delete array // delete array
delete [] iterArray; delete [] iterArray;
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <omp.h> #include <omp.h>
#include "FCoreCommon.hpp"
/** /**
* @author Berenger Bramas (berenger.bramas@inria.fr) * @author Berenger Bramas (berenger.bramas@inria.fr)
...@@ -153,7 +154,7 @@ public: ...@@ -153,7 +154,7 @@ public:
* To execute the fmm algorithm * To execute the fmm algorithm
* Call this function to run the complete algorithm * Call this function to run the complete algorithm
*/ */
void execute(){ void execute(const unsigned operationsToProceed = FFmmNearAndFarFields){
FTRACE( FTrace::FFunction functionTrace( __FUNCTION__, "Fmm" , __FILE__ , __LINE__ ) ); FTRACE( FTrace::FFunction functionTrace( __FUNCTION__, "Fmm" , __FILE__ , __LINE__ ) );
// Count leaf // Count leaf
...@@ -207,15 +208,15 @@ public: ...@@ -207,15 +208,15 @@ public:
} }
// run; // run;
bottomPass(); if(operationsToProceed & FFmmP2M) bottomPass();
upwardPass(); if(operationsToProceed & FFmmM2M) upwardPass();
transferPass(); if(operationsToProceed & FFmmM2L) transferPass();
downardPass(); if(operationsToProceed & FFmmL2L) downardPass();
directPass(); if(operationsToProceed & FFmmP2P || operationsToProceed & FFmmL2P) directPass();
// delete array // delete array
delete [] iterArray; delete [] iterArray;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "../Utils/FGlobal.hpp" #include "../Utils/FGlobal.hpp"
#include "../Containers/FOctree.hpp" #include "../Containers/FOctree.hpp"
#include "FCoreCommon.hpp"
#include <omp.h> #include <omp.h>
...@@ -87,7 +87,7 @@ public: ...@@ -87,7 +87,7 @@ public:
* To execute the fmm algorithm * To execute the fmm algorithm
* Call this function to run the complete algorithm * Call this function to run the complete algorithm
*/ */
void execute(){ void execute(const unsigned operationsToProceed = FFmmNearAndFarFields){
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
// Count leaf // Count leaf
...@@ -100,15 +100,15 @@ public: ...@@ -100,15 +100,15 @@ public:
iterArray = new typename OctreeClass::Iterator[numberOfLeafs]; iterArray = new typename OctreeClass::Iterator[numberOfLeafs];
fassert(iterArray, "iterArray bad alloc", __LINE__, __FILE__); fassert(iterArray, "iterArray bad alloc", __LINE__, __FILE__);
bottomPass(); if(operationsToProceed & FFmmP2M) bottomPass();
upwardPass(); if(operationsToProceed & FFmmM2M) upwardPass();
transferPass(); if(operationsToProceed & FFmmM2L) transferPass();
downardPass(); if(operationsToProceed & FFmmL2L) downardPass();
directPass(); if(operationsToProceed & FFmmP2P || operationsToProceed & FFmmL2P) directPass();
delete [] iterArray; delete [] iterArray;
iterArray = 0; iterArray = 0;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "../Utils/FTic.hpp" #include "../Utils/FTic.hpp"
#include "../Containers/FOctree.hpp" #include "../Containers/FOctree.hpp"
#include "FCoreCommon.hpp"
/** /**
* @author Berenger Bramas (berenger.bramas@inria.fr) * @author Berenger Bramas (berenger.bramas@inria.fr)
...@@ -72,19 +72,18 @@ public: ...@@ -72,19 +72,18 @@ public:
* To execute the fmm algorithm * To execute the fmm algorithm
* Call this function to run the complete algorithm * Call this function to run the complete algorithm
*/ */
void execute(){ void execute(const unsigned operationsToProceed = FFmmNearAndFarFields){
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
bottomPass(); if(operationsToProceed & FFmmP2M) bottomPass();
upwardPass();
transferPass(); if(operationsToProceed & FFmmM2M) upwardPass();
downardPass(); if(operationsToProceed & FFmmM2L) transferPass();
directPass(); if(operationsToProceed & FFmmL2L) downardPass();
if(operationsToProceed & FFmmP2P || operationsToProceed & FFmmL2P) directPass();
} }
/** P2M */ /** P2M */
......
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