peclet.voro 1.0.4
Device-native moving-particle Voronoi dynamics
Loading...
Searching...
No Matches
peclet::voro::WallStore< Real > Struct Template Reference

#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
 

Detailed Description

template<class Real>
struct peclet::voro::WallStore< Real >

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.

Member Typedef Documentation

◆ MemSpace

template<class Real >
using peclet::voro::WallStore< Real >::MemSpace = peclet::core::MemSpace

Member Function Documentation

◆ active()

template<class Real >
KOKKOS_INLINE_FUNCTION bool peclet::voro::WallStore< Real >::active ( ) const
inline

◆ alloc()

template<class Real >
void peclet::voro::WallStore< Real >::alloc ( int  n)
inline

◆ load()

template<class Real >
template<class Cell >
KOKKOS_INLINE_FUNCTION bool peclet::voro::WallStore< Real >::load ( int  i,
Cell &  c,
Real  dx,
Real  dy,
Real  dz 
) const
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.

◆ save()

template<class Real >
template<class Cell >
KOKKOS_INLINE_FUNCTION int peclet::voro::WallStore< Real >::save ( int  i,
const Cell &  c 
) const
inline

Persist the wall planes of finalised cell c at slot i (cell frame = the seed position at clip time). Returns the number stored.

Member Data Documentation

◆ cnt

template<class Real >
Kokkos::View<int*, MemSpace> peclet::voro::WallStore< Real >::cnt

◆ kMax

template<class Real >
constexpr int peclet::voro::WallStore< Real >::kMax = kMaxWallPlanes
staticconstexpr

◆ rec

template<class Real >
Kokkos::View<Real*, MemSpace> peclet::voro::WallStore< Real >::rec

The documentation for this struct was generated from the following file: