Commit d454a1bc authored by BRAMAS Berenger's avatar BRAMAS Berenger

remove the bug but it should not be use for nrhs diff from 0

parent ec2567a4
...@@ -88,7 +88,7 @@ class TestInterpolationKernel : public FUTester<TestInterpolationKernel> { ...@@ -88,7 +88,7 @@ class TestInterpolationKernel : public FUTester<TestInterpolationKernel> {
const int NbLevels = 4; const int NbLevels = 4;
const int SizeSubLevels = 2; const int SizeSubLevels = 2;
// std::cout << "\nInterpolation FMM (ORDER="<< ORDER << ") ... " << std::endl; // std::cout << "\nInterpolation FMM (ORDER="<< ORDER << ") ... " << std::endl;
// Create Matrix Kernel // Create Matrix Kernel
const MatrixKernelClass MatrixKernel; // FUKernelTester is only designed to work with 1/R, i.e. matrix kernel ctor takes no argument. const MatrixKernelClass MatrixKernel; // FUKernelTester is only designed to work with 1/R, i.e. matrix kernel ctor takes no argument.
...@@ -97,23 +97,21 @@ class TestInterpolationKernel : public FUTester<TestInterpolationKernel> { ...@@ -97,23 +97,21 @@ class TestInterpolationKernel : public FUTester<TestInterpolationKernel> {
FmaRWParticle<8,8>* const particles = new FmaRWParticle<8,8>[nbParticles]; FmaRWParticle<8,8>* const particles = new FmaRWParticle<8,8>[nbParticles];
loader.fillParticle(particles,nbParticles); loader.fillParticle(particles,nbParticles);
//
// Create octree // Create octree
OctreeClass tree(NbLevels, SizeSubLevels, loader.getBoxWidth(), loader.getCenterOfBox()); OctreeClass tree(NbLevels, SizeSubLevels, loader.getBoxWidth(), loader.getCenterOfBox());
// Insert particle in the tree // Insert particle in the tree
//
// For each particles we associate Nvals charge ( q,0,0,0) // For each particles we associate Nvals charge ( q,0,0,0)
// // for(int idxPart = 0 ; idxPart < loader.getNumberOfParticles() ; ++idxPart){
/* for(int idxPart = 0 ; idxPart < loader.getNumberOfParticles() ; ++idxPart){ // double q = particles[idxPart].getPhysicalValue();
double q = particles[idxPart].getPhysicalValue(); // tree.insert(particles[idxPart].getPosition() , idxPart, q);//,0.0,0.0,0.0);
tree.insert(particles[idxPart].getPosition() , idxPart, q,q);//,0.0,0.0,0.0); // }
}*/
for(int idxPart = 0 ; idxPart < nbParticles ; ++idxPart){ for(int idxPart = 0 ; idxPart < nbParticles ; ++idxPart){
// // Convert FReal[NVALS] to std::array<FReal,NVALS> // Convert FReal[NVALS] to std::array<FReal,NVALS>
std::array<FReal, (1+4*1)*NVals> physicalState; std::array<FReal, (1+4*1)*NVals> physicalState;
for(int idxVals = 0 ; idxVals < NVals ; ++idxVals){ for(int idxVals = 0 ; idxVals < NVals ; ++idxVals){
double q = particles[idxPart].getPhysicalValue(); double q = particles[idxPart].getPhysicalValue();
physicalState[0*NVals+idxVals]= particles[idxPart].getPhysicalValue(); physicalState[0*NVals+idxVals]= q;
physicalState[1*NVals+idxVals]=0.0; physicalState[1*NVals+idxVals]=0.0;
physicalState[2*NVals+idxVals]=0.0; physicalState[2*NVals+idxVals]=0.0;
physicalState[3*NVals+idxVals]=0.0; physicalState[3*NVals+idxVals]=0.0;
...@@ -123,9 +121,6 @@ class TestInterpolationKernel : public FUTester<TestInterpolationKernel> { ...@@ -123,9 +121,6 @@ class TestInterpolationKernel : public FUTester<TestInterpolationKernel> {
tree.insert(particles[idxPart].getPosition(), idxPart, physicalState); tree.insert(particles[idxPart].getPosition(), idxPart, physicalState);
} }
//
// Run FMM // Run FMM
Print("Fmm..."); Print("Fmm...");
KernelClass kernels(NbLevels, loader.getBoxWidth(), loader.getCenterOfBox(),&MatrixKernel); KernelClass kernels(NbLevels, loader.getBoxWidth(), loader.getCenterOfBox(),&MatrixKernel);
...@@ -270,7 +265,7 @@ class TestInterpolationKernel : public FUTester<TestInterpolationKernel> { ...@@ -270,7 +265,7 @@ class TestInterpolationKernel : public FUTester<TestInterpolationKernel> {
/** TestUnifKernel */ /** TestUnifKernel */
void TestUnifKernel(){ void TestUnifKernel(){
const int NVals = 1; const int NVals = 2;
const unsigned int ORDER = 6 ; const unsigned int ORDER = 6 ;
// run test // run test
typedef FInterpMatrixKernelR MatrixKernelClass; typedef FInterpMatrixKernelR MatrixKernelClass;
......
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