MPGrav(i) uses Xuse(i) and mass M(i) and calculates a 3 vector force from 3 vector Xuse(i,j) |
MPGrav(i) = S M(i)*M(j)*( Xuse(j)-Xuse(i)) |
where ri,j = | Xuse(i)-Xuse(j) | is distance between particle i and particle j |
This calculation involves communication as N-Nproc of values of j (and parameters Xuse(j) M(j) ) are stored outside the processor holding the i'th processor |
We describe algorithms with increasing complexity and efficiency! |
Note in discussions, we are rather sloppy as to whether i,j are "local" (1...N/Nproc) or "global" (1...N) indices |