@@ -26,7 +26,7 @@ To port this algorithm to the GPU, we use the parallel algorithms library Thrust
- Sort the particles on each grid by bin, using a parallel counting sort. We use Thrust's `exclusive\_scan` function to implement the prefix sum phase of the sort, and hand-coded kernels for the rest. This step does not actually involving rearranging the particle data - rather, we compute a permutation that would put the particles in order without actually reordering them.
- Once the particles are sorted by bin, we can loop over the particles in neighboring bins. We make two passes over the particles. First, we launch a kernel to count the number of collision partners for each particle.
- Then, we sum these numbers and allocate space for our neighbor list.
- Finally, we make a another pass over the particles, putting them into to list at the appropriate place.
- Finally, we make another pass over the particles, putting them into the list at the appropriate place.
Note that we build a full neighbor list, meaning that if particle `i` appears in particle `j`'s list, then particle `j` also appears in particle `i`'s list. This simplifies the force-computation step when using these lists, since the forces and torques for a given particle can be updated without atomics.
@@ -69,6 +69,3 @@ To use this optimization, set `particles.reduceGhostParticles` to :cpp:`true` in
Once the neighbor list has been constructed, collisions with both particles and walls can easily be processed.
MFIX-Exa currently runs on both CPU-only and hybrid CPU/GPU architectures.