|
peclet.voro 1.0.4
Device-native moving-particle Voronoi dynamics
|
Kokkos nanobind Python module peclet.voro.
More...
#include "voro_bindings_common.hpp"
Functions | |
| NB_MODULE (_voro, m) | |
Kokkos nanobind Python module peclet.voro.
Drives the production device path — multicore CPU (OpenMP), or GPU (CUDA/HIP), selected by the Kokkos backend the extension was built against — from Python. The PUBLIC surface (what a user of the method needs to set up, run and read out a computation; suite/docs/QUALITY_PLAN.md D2):
optimize_volume_mesh, minimize_interface — the mesh optimisers on a periodic box.peclet.voro.pore_mesh (a lazily imported submodule) carries the SDF-walled pore-space family bound here (optimize_pore_mesh, sdf_voronoi_cells, sdf_voronoi_section).PECLET_VORO_MPI: VoronoiHalo (ghost gather) and DistributedTessellation (the distributed repair driver, mpi/distributed_moving.hpp).Every instrument, ablation switch and validity report lives on the object's diagnostics sub-object (t.diagnostics.build_report()), one per class, holding a reference to its owner.
String modes are validated against the accepted set and the error lists it; call-order requirements are state checks that name the correct order; the literals the engine is driven with are the named defaults below (also peclet.voro.defaults), and the docstrings are generated from them so they cannot drift.
Particle data crosses the boundary as NumPy arrays: positions/velocities are (N,3) float64, scalars (masses, viscosities, volumes) are (N,). Arrays move through the shared peclet::core::python bridge (core): returned arrays are backed by host buffers (no extra device copy).
Kokkos teardown follows the suite-wide pattern of peclet/core/python/kokkos_teardown.hpp: Kokkos is initialized at import; every bound Tessellation / FlowSolver / Simulation is a Releasable (registered on construction, release() drops its Views) and every zero-copy capsule of the shared bridge is one too; the module's single atexit hook (also peclet.voro.finalize()) releases all of them and THEN calls Kokkos::finalize, so an object still referenced at interpreter exit (script globals, a Jupyter/Quarto kernel) can no longer be destroyed after finalize – which is a Kokkos::abort (SIGABRT / exit 134, on OpenMP as on CUDA). Nothing needs del before exit.
| NB_MODULE | ( | _voro | , |
| m | |||
| ) |