|
peclet-dem 1.1.0
Performance-portable XPBD Discrete Element Method (Kokkos + ArborX)
|
What peclet.dem actually computes, and where each piece lives. The engine is header-only Kokkos + ArborX under src/ (compiled as C++; the Kokkos launch compiler routes device code through nvcc/hipcc — there are no .cu files, the CUDA sources were retired in 2026-06). The Python module is peclet.dem; drive it from Python, there is no C++ main.
peclet.dem ships two contact engines over the same particle SoA (src/particles.hpp):
| engine | entry point | driver | contact model | time step |
|---|---|---|---|---|
| impulse / XPBD (default) | Simulation.step(n), relax(n), step_mpi(n) | demSolveContacts (src/solve_driver.hpp) | velocity-level impulses + a position-level non-penetration projection; contacts are hard constraints | set by the collision scale, not by a stiffness |
| force-based | Simulation.step_hertz(substeps), step_hertz_mpi(substeps) | demStepForce + HertzMindlinLaw (src/solve_driver_force.hpp, src/solver_hertz.hpp) | explicit soft-sphere Hertz–Mindlin (Dosta 2024 / LIGGGHTS formulas) | Rayleigh-time limited |
Both engines run the same sequence single-GPU and distributed: the MPI form is the same driver with a different Hooks policy (SoloSolveHooks vs MpiSolveHooks / SoloForceHooks vs MpiForceHooks), so there are no drifting copies. See mpi.md.
Everything below assumes set_dt(dt) has been called — every stepper raises otherwise, there is no default time step.
relax(n) runs the same pipeline at dt = 0 and restores the stored dt afterwards — overlap removal only, no gravity, no velocity update, and it is the one stepper that does not require set_dt. It is what step(0.0) used to be before 1.0.0.
From state $\mathbf{x}_n, \mathbf{v}_n$ and step $\Delta t$: