core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
Loading...
Searching...
No Matches
core

PyPI version Python [License: MIT](LICENSE) CI DOI

Shared infrastructure for the transport-phenomena simulation suite (see ../docs/ for the suite-wide architecture, conventions, style, interfaces and roadmap).

It provides the pieces every method code (flow, dem, voro, …) should share: a common MPI block domain decomposition, an efficient asynchronous ghost-layer exchange (CPU + portable Kokkos GPU), particle migration, dynamic load balancing, unified SDF geometry (peclet::core::geom), an AMR octree flow subsystem (peclet::core::amr), and nanobind Python bindings. Header-only C++20 (the device side, compiled through Kokkos, is also C++20; only the morton dependency pins C++17 — see ../docs/STYLE.md). Cut-cell IBM is not a standalone shared module: it currently lives inside the AMR flow solver (peclet::core::amr) and in flow.

What works today

Validated end-to-end by distributed explicit heat-diffusion solvers (plain, and around an SDF solid obstacle) matching a serial reference cell-for-cell across ranks, and consumed by the validated flow and dem distributed solvers. 26 ctests pass (np 1–8 CPU, 1–4 GPU).

Build / test / benchmark

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
ctest --test-dir build --output-on-failure # 26 ctests: serial + MPI (np=1,2,4,8)
# halo microbenchmark: weak scaling, NBX vs persistent
mpirun -np 4 ./build/benchmarks/bench_halo 48 1 300 # cells/rank/axis, ghost, iters

Requires MPI (OpenMPI/MPICH) and a C++20 compiler. morton is picked up automatically if checked out as a sibling directory (enables PECLET_CORE_HAVE_MORTON).

Status

Complete and in production. The block decomposition, the async ghost-layer exchange (CPU + portable Kokkos GPU, host-staged and opt-in GPU-aware), particle migration, dynamic load balancing (weighted ORB + AMR/Lagrangian rebalancing), SDF geometry, the AMR octree flow subsystem (device + distributed multigrid, collocated projection), and the nanobind Python bindings are all shipped and tested (26 ctests, np 1–8 CPU / 1–4 GPU). flow (distributed cut-cell IBM Navier–Stokes) and dem (distributed XPBD with load rebalancing) are validated consumers. CUDA is retired; Kokkos (CUDA / HIP / OpenMP) is the canonical device path. Remaining work is at-scale multi-GPU tuning.