Commit a50a6eaf authored by BRAMAS Berenger's avatar BRAMAS Berenger

Clen the periodic code and refactorize names

parent 3e6b978c
This diff is collapsed.
......@@ -135,8 +135,7 @@ int main(int argc, char ** argv){
counter.tic();
FmmClass algo(&tree,PeriodicDeep);
KernelClass kernels( DevP, algo.treeHeightForKernel(),
algo.boxwidthForKernel(loader.getBoxWidth()), loader.getCenterOfBox());
KernelClass kernels( DevP, algo.extendedTreeHeight(), algo.extendedBoxWidth(),algo.extendedBoxCenter());
algo.setKernel(&kernels);
algo.execute();
......
......@@ -127,7 +127,7 @@ int main(int argc, char ** argv){
const long long NbParticlesEntireSystem = NbParticles * totalRepeatedBox;
std::cout << "The total number of particles is " << NbParticlesEntireSystem << "\n";
FTreeCoordinate min, max;
algo.repetitions(&min, &max);
algo.repetitionsIntervals(&min, &max);
std::cout << "Min is " << min << " Max is " << max << std::endl;
OctreeClass::Iterator octreeIterator(&tree);
......
......@@ -113,7 +113,7 @@ int main(int argc, char ** argv){
//////////////////////////////////////////////////////////////////////////////////
{
const int repeatedBox = algo.repeatedBox();
const int repeatedBox = algo.theoricalRepetition();
const int totalRepeatedBox = FMath::pow(algo.repeatedBox() , 3);
std::cout << "The box is repeated " << repeatedBox << " there are " << totalRepeatedBox << " boxes in total\n";
const long long NbParticlesEntireSystem = app.global().processCount() * NbParticles * totalRepeatedBox;
......
......@@ -88,8 +88,8 @@ class TestChebyshevDirect : public FUTester<TestChebyshevDirect> {
// Run FMM
Print("Fmm...");
FmmClass algo(&tree,PeriodicDeep );
KernelClass kernels(algo.treeHeightForKernel(), algo.boxcenterForKernel(loader.getCenterOfBox(), loader.getBoxWidth()),
algo.boxwidthForKernel(loader.getBoxWidth()), epsilon);
KernelClass kernels(algo.extendedTreeHeight(), algo.extendedBoxCenter(),
algo.extendedBoxWidth(), epsilon);
algo.setKernel(&kernels);
algo.execute();
......@@ -98,7 +98,7 @@ class TestChebyshevDirect : public FUTester<TestChebyshevDirect> {
Print("Direct...");
FTreeCoordinate min, max;
algo.repetitions(&min, &max);
algo.repetitionsIntervals(&min, &max);
for(int idxTarget = 0 ; idxTarget < loader.getNumberOfParticles() ; ++idxTarget){
for(int idxOther = idxTarget + 1 ; idxOther < loader.getNumberOfParticles() ; ++idxOther){
......
......@@ -76,15 +76,14 @@ class TestRotationDirectPeriodic : public FUTester<TestRotationDirectPeriodic> {
// Run FMM
Print("Fmm...");
FmmClass algo(&tree,PeriodicDeep, DirX | DirMinusY | DirPlusZ);
KernelClass kernels( algo.treeHeightForKernel(), algo.boxwidthForKernel(loader.getBoxWidth()),
algo.boxcenterForKernel(loader.getCenterOfBox(), loader.getBoxWidth()));
KernelClass kernels( algo.extendedTreeHeight(), algo.extendedBoxWidth(), algo.extendedBoxCenter());
algo.setKernel(&kernels);
algo.execute();
// Run Direct
Print("Run direct...");
FTreeCoordinate min, max;
algo.repetitions(&min, &max);
algo.repetitionsIntervals(&min, &max);
for(int idxTarget = 0 ; idxTarget < NbParticles ; ++idxTarget){
for(int idxSource = idxTarget + 1 ; idxSource < NbParticles ; ++idxSource){
......
......@@ -78,16 +78,14 @@ class TestSphericalDirectPeriodic : public FUTester<TestSphericalDirectPeriodic>
// Run FMM
Print("Fmm...");
FmmClass algo(&tree,PeriodicDeep);
KernelClass kernels( DevP, algo.treeHeightForKernel(),
algo.boxwidthForKernel(loader.getBoxWidth()),
algo.boxcenterForKernel(loader.getCenterOfBox(), loader.getBoxWidth()));
KernelClass kernels( DevP, algo.extendedTreeHeight(), algo.extendedBoxWidth(), algo.extendedBoxCenter());
algo.setKernel(&kernels);
algo.execute();
// Run Direct
Print("Run direct...");
FTreeCoordinate min, max;
algo.repetitions(&min, &max);
algo.repetitionsIntervals(&min, &max);
for(int idxTarget = 0 ; idxTarget < NbParticles ; ++idxTarget){
for(int idxSource = idxTarget + 1 ; idxSource < NbParticles ; ++idxSource){
......
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