Commit e6e5ca8f authored by PIACIBELLO Cyrille's avatar PIACIBELLO Cyrille

Add test to avoid computation if no callback is set

parent 426a85df
......@@ -200,6 +200,10 @@ public:
void * getUserKernelDatas(){
return userData;
}
//Getter
Scalfmm_Kernel_Descriptor getKernelFct() const {
return kernel;
}
void M2L_Extended(CellClass * src, CellClass * tgt, const FTreeCoordinate transfer, const int level){
if(kernel.m2l_ext){
......@@ -456,6 +460,7 @@ public:
*
*/
void internal_M2L(){
if(this->kernel->getKernelFct().m2l_ext){
if(upperLimit > 1){ // if upperLimit == 1, then, M2L has been
// done at level 2, and hence all the far
// field has been calculated.
......@@ -526,6 +531,8 @@ public:
}
}
}
void execute_fmm(){
FAssertLF(kernel,"No kernel set, please use scalfmm_user_kernel_config before calling the execute routine ... Exiting \n");
FAbstractAlgorithm * abstrct = nullptr;
......@@ -570,7 +577,6 @@ public:
}
if (FScalFMMEngine<FReal>::Algorithm != 2){
if(upperLimit != 2){
printf("At least I'm here\n");
abstrct->execute(FFmmP2M | FFmmM2M | FFmmM2L, upperLimit, treeHeight);
printf("\tUpPass finished\n");
internal_M2L();
......
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