Commits

Rio Yokota committed a1c93fb

setup for debugging periodic

  • Participants
  • Parent commits 99d620b

Comments (0)

Files changed (3)

kernel/CPUEwaldLaplace.cxx

     for( int d=0; d<3; d++ ) B->TRG[d+1] *= scale;
   }
 
-#if 0
+#if 1
   vect dipole = 0;
   for( B_iter B=bodies.begin(); B!=bodies.end(); ++B ) {
     dipole += (B->X - R0) * B->SRC;

unit_test/ewald_fmm.cxx

 #include "serialfmm.h"
 
 int main() {
-  const int numBodies = 3000;                                   // Number of bodies - DEF=1000.
-  const real delBodies = pow(numBodies, 1.0/3.0)/10.0;         // change in numBodies
-  const real xmax = 3.10736;                                      // Size of domain - DEF=100.0
-  const real delXmax = 100.0/xmax;                             // Change in xmax
-  const real ksize = 11.0*delBodies;                           // Ewald wave number
-  const real alpha = 1.0/.289108; //0.2*delXmax*delBodies;                    // Ewald alpha value
+  const int numBodies = 1000;                                  // Number of bodies
+  const real xmax = 100.0;                                     // Size of domain
+  const real ksize = 11.0;                                     // Ewald wave number
+  const real alpha = 0.1;                                      // Ewald alpha value
   const real sigma = .25 / M_PI;                               // Ewald sigma value
   IMAGES = 4;                                                  // Level of periodic image tree (0 for non-periodic)
   THETA = 1 / sqrt(4);                                         // Multipole acceptance criteria
   
-  std::cout << "numBodies: " << numBodies << ", delBodies: " << delBodies << std::endl << "xmax: " << xmax << ", delXmax: " << delXmax << std::endl << "ksize: " << ksize << ", alpha: " << alpha << std::endl << "sigma: " << sigma <<", IMAGES: "  << IMAGES << ", THETA: " << THETA << std::endl;
-
   Bodies bodies(numBodies);                                     // Define vector of bodies
   Bodies jbodies;                                               // Define vector of source bodies
   Cells cells, jcells;                                          // Define vector of cells

unit_test/serialrun.cxx

 #endif
 
 int main() {
-  const int numBodies = 100000;                                 // Number of bodies
+  const int numBodies = 1000;                                   // Number of bodies
   const int numTarget = 100;                                    // Number of target points to be used for error eval
-  IMAGES = 1;                                                   // Level of periodic image tree (0 for non-periodic)
+  IMAGES = 3;                                                   // Level of periodic image tree (0 for non-periodic)
   THETA = 1 / sqrtf(4);                                         // Multipole acceptance criteria
   Bodies bodies(numBodies);                                     // Define vector of bodies
   Bodies jbodies;                                               // Define vector of source bodies