|
peclet-dem 1.1.0
Performance-portable XPBD Discrete Element Method (Kokkos + ArborX)
|
dem — portable (Kokkos) periodic ghost generation (periodicity.cu / integration.cu). More...
Go to the source code of this file.
Namespaces | |
| namespace | peclet |
| namespace | peclet::dem |
Functions | |
| int | peclet::dem::calculateGhostCapacity (int nReal, Domain dom, float skin) |
| Padded particle-array capacity that leaves room for the periodic ghosts generateGhosts will emit: the real count plus an estimate of the boundary-shell ghost population, gated on which axes are actually periodic. | |
| void | peclet::dem::generateGhosts (int numReal, int capacity, Domain dom, float skin, const BodyState &bodies, const BodyPred &pred, Vi realIndices, Kokkos::View< int, CpMem > topGhost, Vi gid=Vi{}, Kokkos::View< unsigned char *, CpMem > materialId={}) |
| Generate periodic ghosts for particles [0,numReal). | |
dem — portable (Kokkos) periodic ghost generation (periodicity.cu / integration.cu).
Per real particle near a periodic face, emit shifted ghost copies into atomically-allocated slots past num_real, copying the full per-particle state and mapping each ghost back to its real owner (real_indices) for momentum conservation. Faithful port of generate_ghosts_bitmask_kernel; ghost positions use the predicted state to align with the solver. Decoupled from any BVH (the CUDA candidate pre-pass was just an optimization; the boundary test is inlined here).
Definition in file periodicity.hpp.