CmPA / iPic3D

Particle-in-Cell code using the implicit moment method
72 stars 55 forks source link

use int rather than long long in critical particle loops #36

Open alecjohnson opened 11 years ago

alecjohnson commented 11 years ago

We need to use long long for particle IDs to support more than 2 billion (2^31) particles. But there is no reason to support having so many particles in a single MPI process. There is a potential cost to using long long in a particle loop. Therefore, I am changing to use int, preceeded by an assertion that nop is no greater than INT_MAX, in the following two critical methods:

  Particles3D::mover_PC()
  Particles3Dcomm::interpP2G()
markidis commented 11 years ago

Hi Alec,

yes, this is correct. Thanks, stefano.