Game Development Reference
Figure 7.4. Particles to be sent at t +Δ t (left) and their configuration at t (right).
Actually, we are not using a uniform grid but rather a sliced grid, which has a
much tighter fit to particle distribution, as will be described in Section 7.4.
7.3.2 Receiving Data
If all the processors are using the same indices for particles, all we have to do is
update the values of these particles after receiving the data from other processors.
However, in our approach, each processor manages its own data and does not
have a unique index for a particle in all of the particles of the simulation. Thus,
the index of a particle at a boundary of a subdomain does not necessarily agree
between the two processors sharing the boundary. When one processor receives
particles from another, it adds them to its own particle list. We have to be careful
about the duplication of particles. If we cannot guarantee that the particle sent
from a neighbor does not already exist in the list, all the particles have to be
scanned to find the entry—something we do not want to do.
However, what we have to do is delete the particles in the ghost region that
were received in the previous time step. For example, p 0 received a set of particles
from p 1 at time t . The set of particles consists of particles in x t +Δ t
x t +Δ t
m . So after deleting particles in x t +Δ t >m , only particles in x t +Δ t
m remain. Note that this is not the same as the set of particles in the ghost region
after updating the particle positions. This can be proved by the following two
1. A set of particles GP 1 → 0 that is in G 1 → 0 at time t is included in the set of
particles SP t +Δ t