Commit 5dc0985c authored by PIACIBELLO Cyrille's avatar PIACIBELLO Cyrille

Api Works now in periodic

parent 6ab40aff
......@@ -176,6 +176,8 @@ public:
forcesToFill[indexes[idxPart]*3+0] = sources->getForcesX()[idxPart];
forcesToFill[indexes[idxPart]*3+1] = sources->getForcesY()[idxPart];
forcesToFill[indexes[idxPart]*3+2] = sources->getForcesZ()[idxPart];
printf("forces found : %e,%e,%e\n",
sources->getForcesX()[idxPart],sources->getForcesY()[idxPart],sources->getForcesZ()[idxPart]);
}
});
}
......@@ -545,6 +547,7 @@ public:
{
typedef FFmmAlgorithmPeriodic<OctreeClass,InterCell,ContainerClass,InterKernel,LeafClass> AlgoClassPeriodic;
AlgoClassPeriodic algoPeriod(octree,2);
algoPeriod.setKernel(kernel);
algoPeriod.execute();
break;
}
......
......@@ -65,10 +65,6 @@ public:
return this->kernelType;
}
// //To deal with particles moving outside the box
// void out_of_the_box_config(scalfmm_out_of_box_behavior config){
// this->OutOfBoxBehavior = config;
// }
//To change default algorithm
void algorithm_config(scalfmm_algorithm config){
......
......@@ -29,9 +29,9 @@ int main(int argc, char ** av){
//Init our lib
scalfmm_handle handle = scalfmm_init(TreeHeight,boxWidth,boxCenter,myChoice); //The tree is built
scalfmm_algorithm_config(handle,periodic);
//Creation of an array of particles
int nb_of_parts = 10;
int nb_of_parts = 2;
int idxPart;
double * positionsXYZ = malloc(sizeof(double)*3*nb_of_parts);
memset(positionsXYZ,0,sizeof(double)*3*nb_of_parts);
......@@ -45,7 +45,7 @@ int main(int argc, char ** av){
//Creation of charge for each part
double * array_of_charge = malloc(sizeof(double)*nb_of_parts);
for(idxPart = 0; idxPart<nb_of_parts ; ++idxPart){
array_of_charge[idxPart] = 1.0*(idxPart%2);
array_of_charge[idxPart] = 1.0;
}
//Inserting the array in the tree
......
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