takaiwa avatar takaiwa committed b60c5c6

ijparallelrun.cxx

Comments (0)

Files changed (1)

unit_test/ijparallelrun.cxx

 int main() {
   const int numBodies = 10000;                                  // Number of bodies
   const int numTarget = 100;                                    // Number of target points to be used for error eval
-  IMAGES = 0;                                                   // Level of periodic image tree (0 for non-periodic)
+  IMAGES = 1;                                                   // Level of periodic image tree (0 for non-periodic)
   THETA = 1 / sqrtf(4);                                         // Multipole acceptance criteria
   Bodies bodies(numTarget);                                     // Define vector of target bodies
   Bodies jbodies(numBodies);                                    // Define vector of source bodies
   FMM.stopTimer("Set bodies",FMM.printNow);                     // Stop timer
 
   FMM.startTimer("Set domain");                                 // Start timer
-  FMM.setGlobDomain(bodies,0,M_PI);                             // Set global domain size of FMM
+  FMM.setGlobDomain(bodies);                                    // Set global domain size of FMM
+  FMM.setGlobDomain(jbodies);                                   // Set global domain size of FMM
   FMM.stopTimer("Set domain",FMM.printNow);                     // Stop timer
 
-  if( IMAGES != 0 ) {                                           // For periodic boundary condition
-    FMM.startTimer("Set periodic");                             //  Start timer
-    jbodies2 = FMM.periodicBodies(jbodies);                     //  Copy source bodies for all periodic images
-    FMM.stopTimer("Set periodic",FMM.printNow);                 //  Stop timer
-    FMM.eraseTimer("Set periodic");                             //  Erase entry from timer to avoid timer overlap
-  } else {                                                      // For free field boundary condition
-    jbodies2 = jbodies;                                         //  Copy source bodies
-  }                                                             // End if for periodic boundary condition
-
+  jbodies2 = jbodies;                                           // Copy source bodies
   FMM.startTimer("Direct sum");                                 // Start timer
   for( int i=0; i!=MPISIZE; ++i ) {                             // Loop over all MPI processes
     FMM.shiftBodies(jbodies2);                                  //  Communicate bodies round-robin
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.