Game Development Reference
In-Depth Information
g
l
g
t+∆t
t
0
m-g
m
m-g-l
m
0
t+∆t
GP 0→1
t+∆t
EP 0→1
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
>m and
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
propositions:
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
1
0 , which will be sent from the adjacent subdomain at time
t t (see Figure 7.4 ) .
 
 
Search Nedrilad ::




Custom Search