Commit 5ea608a4 authored by Quentin Khan's avatar Quentin Khan

testFmmAlgorithmBalanced: code refactor for better clarity

parent 4a7fd13c
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
//#include "Kernels/Chebyshev/FChebSymKernel.hpp" //#include "Kernels/Chebyshev/FChebSymKernel.hpp"
#include "Components/FTestKernels.hpp" #include "Components/FTestKernels.hpp"
#include "BalanceTree/FChebSymCostKernel.hpp" #include "BalanceTree/FChebSymCostKernel.hpp"
#include "BalanceTree/FDumbCostKernel.hpp"
// Algorithm // Algorithm
#include "Core/FFmmAlgorithmThread.hpp" #include "Core/FFmmAlgorithmThread.hpp"
...@@ -61,9 +62,11 @@ using LeafClass = FSimpleLeaf< FReal, ContainerClass >; ...@@ -61,9 +62,11 @@ using LeafClass = FSimpleLeaf< FReal, ContainerClass >;
using OctreeClass = FOctree< FReal, CellClass, ContainerClass, LeafClass >; using OctreeClass = FOctree< FReal, CellClass, ContainerClass, LeafClass >;
using MatrixKernelClass = FInterpMatrixKernelR<FReal>; using MatrixKernelClass = FInterpMatrixKernelR<FReal>;
using BalanceKernelClass= FChebSymCostKernel<FReal, CellClass, ContainerClass, // using CostKernelClass = FChebSymCostKernel<FReal, CellClass, ContainerClass,
MatrixKernelClass, ORDER, // MatrixKernelClass, ORDER,
OctreeClass>; // OctreeClass>;
using CostKernelClass = FDumbCostKernel<FReal, CellClass, ContainerClass,
OctreeClass>;
using KernelClass = FTestKernels< CellClass, ContainerClass>; using KernelClass = FTestKernels< CellClass, ContainerClass>;
...@@ -93,13 +96,13 @@ int main(int argc, char** argv) ...@@ -93,13 +96,13 @@ int main(int argc, char** argv)
/* Compute the cost of each tree cell *************************************/ /* Compute the cost of each tree cell *************************************/
BalanceKernelClass balanceKernel(&tree, epsilon); CostKernelClass costKernel(&tree, epsilon);
FmmClass<FFmmAlgorithmThread, BalanceKernelClass> costAlgo(&tree, &balanceKernel); FmmClass<FFmmAlgorithmThread, CostKernelClass> costAlgo(&tree, &costKernel);
costAlgo.execute(); costAlgo.execute();
if (args.verboseLevel() > 1) { if (args.verboseLevel() > 1) {
balanceKernel.printResults(std::cout); //costKernel.printResults(std::cout);
} }
/**************************************************************************/ /**************************************************************************/
...@@ -108,10 +111,6 @@ int main(int argc, char** argv) ...@@ -108,10 +111,6 @@ int main(int argc, char** argv)
FCostZones<OctreeClass, CellClass> costzones(&tree, args.zoneCount()); FCostZones<OctreeClass, CellClass> costzones(&tree, args.zoneCount());
costzones.run(); costzones.run();
//writeZones(args, costzones);
//if (args.verboseLevel() == -1) {
printZonesCosts(tree, costzones);
//}
/**************************************************************************/ /**************************************************************************/
std::cerr << "Done" << std::endl; std::cerr << "Done" << std::endl;
......
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