Commit d6243220 authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files

print out was wrong when debuged

parent 3eda9d44
...@@ -70,7 +70,7 @@ class TestRotationDirect : public FUTester<TestRotationDirect> { ...@@ -70,7 +70,7 @@ class TestRotationDirect : public FUTester<TestRotationDirect> {
Print(quarterDimLeaf); Print(quarterDimLeaf);
TestParticle* const particles = new TestParticle[nbParticles]; TestParticle* const particles = new TestParticle[nbParticles];
particles[0].position = FPoint(quarterDimLeaf, quarterDimLeaf, quarterDimLeaf); particles[0].position = FPoint(2*quarterDimLeaf, quarterDimLeaf, quarterDimLeaf);
particles[0].physicalValue = 0.50; particles[0].physicalValue = 0.50;
particles[1].position = FPoint(2*quarterDimLeaf, quarterDimLeaf, quarterDimLeaf); particles[1].position = FPoint(2*quarterDimLeaf, quarterDimLeaf, quarterDimLeaf);
particles[1].physicalValue = -0.10; particles[1].physicalValue = -0.10;
...@@ -78,11 +78,12 @@ class TestRotationDirect : public FUTester<TestRotationDirect> { ...@@ -78,11 +78,12 @@ class TestRotationDirect : public FUTester<TestRotationDirect> {
Print("Number of particles:"); Print("Number of particles:");
Print(nbParticles); Print(nbParticles);
for(int idxLeafX = 0 ; idxLeafX < dimGrid ; ++idxLeafX){ for(int idxLeafX = 0 ; idxLeafX < 2/*dimGrid*/ ; ++idxLeafX){
for(int idxLeafY = 0 ; idxLeafY < dimGrid ; ++idxLeafY){ for(int idxLeafY = 0 ; idxLeafY < 1/*dimGrid*/ ; ++idxLeafY){
for(int idxLeafZ = 0 ; idxLeafZ < dimGrid ; ++idxLeafZ){ for(int idxLeafZ = 0 ; idxLeafZ < 1/*dimGrid*/ ; ++idxLeafZ){
particles[1].position = FPoint(FReal(idxLeafX)*dimLeaf + 2*quarterDimLeaf, particles[0].position = FPoint((idxLeafX+1)*quarterDimLeaf, quarterDimLeaf, quarterDimLeaf);
particles[1].position = FPoint(FReal(2)*dimLeaf + 2*quarterDimLeaf,
FReal(idxLeafY)*dimLeaf + quarterDimLeaf, FReal(idxLeafY)*dimLeaf + quarterDimLeaf,
FReal(idxLeafZ)*dimLeaf + quarterDimLeaf); FReal(idxLeafZ)*dimLeaf + quarterDimLeaf);
...@@ -157,8 +158,8 @@ class TestRotationDirect : public FUTester<TestRotationDirect> { ...@@ -157,8 +158,8 @@ class TestRotationDirect : public FUTester<TestRotationDirect> {
std::cout << "Multipole:\n"; std::cout << "Multipole:\n";
int index_j_k = 0; int index_j_k = 0;
for (int j = 0 ; j <= P ; ++j ){ for (int j = 0 ; j <= P ; ++j ){
std::cout <<"[" << j << "] " << "[0] " << cell->getMultipole()[index_j_k].getReal() << " i" << cell->getMultipole()[index_j_k].getImag() << "\t"; std::cout <<"[" << j << "] ";
for (int k=1; k<=j ;++k, ++index_j_k){ for (int k=0; k<=j ;++k, ++index_j_k){
std::cout << "[" << k << "] " << cell->getMultipole()[index_j_k].getReal() << " i" << cell->getMultipole()[index_j_k].getImag() << " "; std::cout << "[" << k << "] " << cell->getMultipole()[index_j_k].getReal() << " i" << cell->getMultipole()[index_j_k].getImag() << " ";
} }
std::cout << "\n"; std::cout << "\n";
...@@ -167,8 +168,8 @@ class TestRotationDirect : public FUTester<TestRotationDirect> { ...@@ -167,8 +168,8 @@ class TestRotationDirect : public FUTester<TestRotationDirect> {
std::cout << "Local:\n"; std::cout << "Local:\n";
index_j_k = 0; index_j_k = 0;
for (int j = 0 ; j <= P ; ++j ){ for (int j = 0 ; j <= P ; ++j ){
std::cout <<"[" << j << "] " << "[0] " << cell->getLocal()[index_j_k].getReal() << " i" << cell->getLocal()[index_j_k].getImag() << "\t"; std::cout <<"[" << j << "] ";
for (int k=1; k<=j ;++k, ++index_j_k){ for (int k=0; k<=j ;++k, ++index_j_k){
std::cout << "[" << k << "] " << cell->getLocal()[index_j_k].getReal() << " i" << cell->getLocal()[index_j_k].getImag() << " "; std::cout << "[" << k << "] " << cell->getLocal()[index_j_k].getReal() << " i" << cell->getLocal()[index_j_k].getImag() << " ";
} }
std::cout << "\n"; std::cout << "\n";
...@@ -221,7 +222,7 @@ class TestRotationDirect : public FUTester<TestRotationDirect> { ...@@ -221,7 +222,7 @@ class TestRotationDirect : public FUTester<TestRotationDirect> {
// The tests! // The tests!
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
static const int P = 2; static const int P = 1;
/** Rotation */ /** Rotation */
void TestRotation(){ void TestRotation(){
......
...@@ -173,8 +173,8 @@ class TestSphericalDirect : public FUTester<TestSphericalDirect> { ...@@ -173,8 +173,8 @@ class TestSphericalDirect : public FUTester<TestSphericalDirect> {
std::cout << "Multipole:\n"; std::cout << "Multipole:\n";
int index_j_k = 0; int index_j_k = 0;
for (int j = 0 ; j <= DevP ; ++j ){ for (int j = 0 ; j <= DevP ; ++j ){
std::cout <<"[" << j << "] " << "[0] " << cell->getMultipole()[index_j_k].getReal() << " i" << cell->getMultipole()[index_j_k].getImag() << "\t"; std::cout <<"[" << j << "]\n";
for (int k=1; k<=j ;++k, ++index_j_k){ for (int k=0; k<=j ;++k, ++index_j_k){
std::cout << "[" << k << "] " << cell->getMultipole()[index_j_k].getReal() << " i" << cell->getMultipole()[index_j_k].getImag() << " "; std::cout << "[" << k << "] " << cell->getMultipole()[index_j_k].getReal() << " i" << cell->getMultipole()[index_j_k].getImag() << " ";
} }
std::cout << "\n"; std::cout << "\n";
...@@ -183,8 +183,8 @@ class TestSphericalDirect : public FUTester<TestSphericalDirect> { ...@@ -183,8 +183,8 @@ class TestSphericalDirect : public FUTester<TestSphericalDirect> {
std::cout << "Local:\n"; std::cout << "Local:\n";
index_j_k = 0; index_j_k = 0;
for (int j = 0 ; j <= DevP ; ++j ){ for (int j = 0 ; j <= DevP ; ++j ){
std::cout <<"[" << j << "] " << "[0] " << cell->getLocal()[index_j_k].getReal() << " i" << cell->getLocal()[index_j_k].getImag() << "\t"; std::cout <<"[" << j << "]\n";
for (int k=1; k<=j ;++k, ++index_j_k){ for (int k=0; k<=j ;++k, ++index_j_k){
std::cout << "[" << k << "] " << cell->getLocal()[index_j_k].getReal() << " i" << cell->getLocal()[index_j_k].getImag() << " "; std::cout << "[" << k << "] " << cell->getLocal()[index_j_k].getReal() << " i" << cell->getLocal()[index_j_k].getImag() << " ";
} }
std::cout << "\n"; std::cout << "\n";
......
Supports Markdown
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