|
peclet.voro 1.0.4
Device-native moving-particle Voronoi dynamics
|
#include <sdf.hpp>
Public Types | |
| using | MemSpace = peclet::core::MemSpace |
Public Member Functions | |
| void | alloc (int n) |
| KOKKOS_INLINE_FUNCTION bool | active () const |
| template<class Cell > | |
| KOKKOS_INLINE_FUNCTION int | save (int i, const Cell &c) const |
| template<class Cell > | |
| KOKKOS_INLINE_FUNCTION bool | load (int i, Cell &c, Real dx, Real dy, Real dz) const |
Public Attributes | |
| Kokkos::View< Real *, MemSpace > | rec |
| Kokkos::View< int *, MemSpace > | cnt |
Static Public Attributes | |
| static constexpr int | kMax = kMaxWallPlanes |
Resident per-cell SDF wall planes for the moving-point path (rung A0 of the Voronoi methods plan). The TopologyStore keeps only neighbour ids + triangles: a neighbour plane is rebuilt from the neighbour's current position (reevalGeometry), but a wall plane has no partner seed, so its equation must be PERSISTED. Each wall plane is stored in the form (û, h): û the unit foot-point direction (from the seed into the solid) and h the seed→plane distance at the time of the clip. When the seed has moved by d since then, the SAME world plane has foot distance h' = h − û·d, so the cell-frame plane is n = h' û, nn = h'² — exact for the stored tangent plane. h' ≤ 0 means the seed crossed its own wall plane: the cell is invalid and must be re-gathered.
Records are listed in plane order among the cell's planes k ≥ 6 with pnbr[k] < 0 (the six box planes k < 6 are re-seeded by initBoxPlanes and never stored). Allocated only when an SDF is in use; a default-constructed (empty) store is a no-op in load/save.
| using peclet::voro::WallStore< Real >::MemSpace = peclet::core::MemSpace |
|
inline |
|
inline |
|
inline |
Restore the wall-plane equations of slot i into a cell just reloaded by TopologyStore::load, for a seed displaced by (dx,dy,dz) (min-imaged) from where the planes were saved. Returns false if the seed crossed one of its wall planes (h' ≤ 0) — the cell must be re-gathered.
|
inline |
Persist the wall planes of finalised cell c at slot i (cell frame = the seed position at clip time). Returns the number stored.
| Kokkos::View<int*, MemSpace> peclet::voro::WallStore< Real >::cnt |
|
staticconstexpr |
| Kokkos::View<Real*, MemSpace> peclet::voro::WallStore< Real >::rec |