|
| void | setWeights (const Kokkos::View< Real *, Mem > &w) |
| | Set the per-seed power weights (Weighted only). Held by reference; the caller keeps it alive.
|
| |
| void | alloc (int n, const Real Lbox[3], Real tol_, Real skin_, int sw_=4, int densityCount_=-1, int nProc_=-1) |
| |
| void | rebuild (const Kokkos::View< Real *, Mem > &pos, bool eagerAdj=true) |
| |
| int | compact (const Kokkos::View< int *, Mem > &m, const Kokkos::View< int *, Mem > &wl) |
| | Compact the nonzero entries of m[0..nProc) into wl, returning the count.
|
| |
| template<bool Local> |
| void | certify (const Kokkos::View< Real *, Mem > &pos, const Kokkos::View< int *, Mem > &outMask, const Kokkos::View< int *, Mem > &outMover, bool useSkin) |
| |
| template<bool Local> |
| void | certifyList (const Kokkos::View< Real *, Mem > &pos, const Kokkos::View< int *, Mem > &list, int n, const Kokkos::View< int *, Mem > &outMask) |
| |
| void | rebuildAdjAll (const Kokkos::View< Real *, Mem > &pos) |
| |
| void | maybeBuildAdj (const Kokkos::View< Real *, Mem > &pos) |
| |
| void | gatherSet (const TessGrid< Real > &grid, const Kokkos::View< int *, Mem > &wl, int n, const Kokkos::View< Real *, Mem > &pos) |
| |
| void | collectNewNbrs (const Kokkos::View< int *, Mem > &wl, int n, const Kokkos::View< int *, Mem > &outMask) |
| |
| void | surgicalRepair (const Kokkos::View< int *, Mem > &wl, int n, const Kokkos::View< Real *, Mem > &pos) |
| |
| bool | dilate (const TessGrid< Real > &grid, const Kokkos::View< Real *, Mem > &pos) |
| |
| void | certifyDispatch (const Kokkos::View< Real *, Mem > &pos, const Kokkos::View< int *, Mem > &outMask, const Kokkos::View< int *, Mem > &outMover, bool useSkin) |
| |
| void | certifyListDispatch (const Kokkos::View< Real *, Mem > &pos, const Kokkos::View< int *, Mem > &list, int n, const Kokkos::View< int *, Mem > &outMask) |
| |
| RepairStats | step (const Kokkos::View< Real *, Mem > &pos) |
| | One moving-point update step. Updates store + vol in place from pos.
|
| |
|
| int | N = 0 |
| | total cells in the resident arrays (single-domain: all; MPI: owned+ghost)
|
| |
| int | nProc |
| |
| int | sw = 4 |
| |
| int | densityCount = -1 |
| |
| Real | L [3] = {1, 1, 1} |
| |
| Real | tol |
| | certificate tolerance (absolute distance); ~1e-4·spacing FP64, ~2e-3·spacing FP32
|
| |
| Real | skin = 0 |
| | Verlet skin width (absolute); a particle moving > skin/2 is a Pass-1 mover.
|
| |
| int | verifyCap = 2 |
| | max verify extra-passes before falling back to a full rebuild
|
| |
| bool | useGate = true |
| | high-churn → rebuild routing (the "never slower than rebuild" guard)
|
| |
| bool | useDilation |
| |
| double | churnThresh |
| |
| double | dilateMaxChurn |
| |
| int | clusterNbhd = 18 |
| |
| bool | surgical |
| | repair flip cells by re-clipping known candidates instead of gathering
|
| |
| bool | localCert |
| |
| bool | adjFresh |
| |
| bool | useLocalNow = false |
| | this step's certify uses the local cert (= localCert && adjFresh)
|
| |
| Store | store |
| |
| Kokkos::View< Real *, Mem > | vol |
| |
| Kokkos::View< Real *, Mem > | xRef |
| |
| Kokkos::View< Real *, Mem > | weight |
| |
| Kokkos::View< int *, Mem > | mask |
| |
| Kokkos::View< int *, Mem > | mask2 |
| |
| Kokkos::View< int *, Mem > | mover |
| |
| Kokkos::View< int *, Mem > | rebuilt |
| |
| Kokkos::View< int *, Mem > | wl1 |
| |
| Kokkos::View< int *, Mem > | wl2 |
| |
| Kokkos::View< int *, Mem > | wlM |
| |
| Kokkos::View< int *, Mem > | cellFlag |
| |
| Kokkos::View< int *, Mem > | extraNbr |
| |
| Kokkos::View< int *, Mem > | extraCnt |
| |
| Kokkos::View< int, Mem > | counter |
| |
| int | gridNcell = 0 |
| |
template<class Real, int MAXP = 64, int MAXT = 112, bool Weighted = false>
struct peclet::voro::MovingTessellation< Real, MAXP, MAXT, Weighted >
Resident moving-point tessellation with two-pass gather repair. MAXP/MAXT must match CellBuilder::kMaxP / kMaxT (64 / 112).
template<class Real , int MAXP = 64, int MAXT = 112, bool Weighted = false>
template<bool Local>
| void peclet::voro::MovingTessellation< Real, MAXP, MAXT, Weighted >::certify |
( |
const Kokkos::View< Real *, Mem > & |
pos, |
|
|
const Kokkos::View< int *, Mem > & |
outMask, |
|
|
const Kokkos::View< int *, Mem > & |
outMover, |
|
|
bool |
useSkin |
|
) |
| |
|
inline |
Re-eval every cell on pos over its stored topology, write its volume, and classify it: outMask(i)=1 if the cell is inconsistent (lost-face) OR is a violated-plane partner of some flagging cell (the flip side — fully covered by Pass 1) OR is a skin-mover; outMover(i)=1 if the cell moved > skin/2 since its last (re)build (the INSERTION trigger — only these need their new neighbours expanded in Pass 2, §1c). useSkin gates the mover trigger (off during verify passes — movers are a once-per-step trigger already folded into Pass 1, and the verify only needs to re-close residual flips).
template<class Real , int MAXP = 64, int MAXT = 112, bool Weighted = false>
template<bool Local>
| void peclet::voro::MovingTessellation< Real, MAXP, MAXT, Weighted >::certifyList |
( |
const Kokkos::View< Real *, Mem > & |
pos, |
|
|
const Kokkos::View< int *, Mem > & |
list, |
|
|
int |
n, |
|
|
const Kokkos::View< int *, Mem > & |
outMask |
|
) |
| |
|
inline |
Scoped re-certify: reeval + certificate over ONLY the n cells in list (refresh their vol), set outMask(i)=1 for any inconsistent + OR-mark their partners. The verify uses this instead of a full re-certify: after the gathers, every NON-gathered cell's reeval is bit-identical to the Pass-1 certify (its store + its neighbours' positions are unchanged), and every gained edge has BOTH endpoints gathered (a flip's partner endpoints in Pass 1, a mover's new neighbours in Pass 2), so only the gathered cells can differ — re-checking just them is provably equivalent to a full re-certify at a fraction of the cost (this is what lets the small-displacement speedup rise instead of being pinned by a second full-N reeval).
template<class Real , int MAXP = 64, int MAXT = 112, bool Weighted = false>
Dense-cluster dilation (Phase 3): bin the flagged cells into the linear grid, then add every owned cell whose 27-grid-cell neighbourhood holds > clusterNbhd flagged seeds to the Pass-1 mask. This over-covers a local cascade in ONE regional gather instead of paying a kernel-launch per verify iteration. Over-coverage is always safe (a gathered cell is just re-clipped correctly). Returns true if it added any cell. Uses the linear grid index (independent of the grid's Morton ordering).
template<class Real , int MAXP = 64, int MAXT = 112, bool Weighted = false>
Gather the n cells listed in wl[0..n) off grid (updating store + vol in place), mark them rebuilt, and RESET their Verlet reference to the current position (their neighbourhood is now fresh, so the skin/2 mover test for these cells restarts from here — proper per-cell Verlet). Reuses the per-step grid.
template<class Real , int MAXP = 64, int MAXT = 112, bool Weighted = false>
Lazily repopulate store.poke4 on a low-churn step so later steps use the cheap local certificate. A gate-rebuild clears adjFresh; gating steps return before this runs, so a sustained high-churn regime keeps falling back to the brute certificate (no adj overhead), and a low-churn streak pays the full rebuildAdjAll exactly once (then gathers maintain adj incrementally).
template<class Real , int MAXP = 64, int MAXT = 112, bool Weighted = false>
Full cold (re)build: the production tessellator emitting the resident topology + volume, then reset the Verlet reference. This is the oracle, the fallback, and the initial build.
- Parameters
-
| eagerAdj | populate store.poke4 now (default; the cheap initial/explicit rebuild → next step is local). A GATE-rebuild passes false: in a high-churn regime we keep rebuilding, so paying rebuildAdjAll every step is wasted — fall back to the brute certificate until churn drops, then maybeBuildAdj rebuilds the adjacency once. |
template<class Real , int MAXP = 64, int MAXT = 112, bool Weighted = false>
Repopulate store.poke4 for ALL owned cells from the resident topology — pure topology (brute findSharing, ConvexCell::rebuildAdjacency), no incremental stitch. Used only after a cold buildTessellation (which does not emit adjacency); the frequent gathers maintain adj incrementally. The result is element-for-element identical to the gather's incremental adj (validated foundation gate), so the two adj sources mix cleanly across the store.
template<class Real , int MAXP = 64, int MAXT = 112, bool Weighted = false>
Phase-4 single-face surgical repair: rebuild each flip cell in wl[0..n) by re-clipping the box with its KNOWN candidate set — stored neighbours ∪ partner-discovered extras (extraNbr) — at the current positions, with NO grid gather (the clip is order-independent and only commits planes that cut, so stale/lost-face neighbours are harmless no-ops). Updates store + vol, marks rebuilt, resets the Verlet reference. A cell whose candidate set is incomplete comes out wrong and is caught + re-gathered by the verify loop (the exact fallback) — so surgical is safe by construction. Used only for FLIP cells; far-mover insertions keep the full gather (their new neighbours aren't in any candidate list).
template<class Real , int MAXP = 64, int MAXT = 112, bool Weighted = false>
Initial value:store.poke4 is valid for the whole current topology. Gathers maintain it incrementally (TrackAdj clip + outAdj); a cold buildTessellation does NOT emit adj, so it clears this and maybeBuildAdj repopulates lazily (skipped on a gate-rebuild so a sustained high-churn regime stays on the brute cert).
template<class Real , int MAXP = 64, int MAXT = 112, bool Weighted = false>
Initial value:use ConvexCell::isLocallyConvexPartners (read each triangle's 4 precomputed poke4 planes — 3 edge-opposite + 4th-face — O(nt)) instead of the brute O(nt·np) form. The gather derives poke4 from the clip-maintained edge adjacency (computePoke4, no findSharing) into store.poke4, so it is fused into the build with no separate maintenance pass, and the cert reads it directly each step. With the 4th-face plane the local cert is COMPLETE (matches the brute flag set — bench GATE 2), so there is no fallback gate.
template<class Real , int MAXP = 64, int MAXT = 112, bool Weighted = false>
Initial value:dense-cluster regional dilation branch. DEFAULT OFF: on Poisson/lattice workloads there are no genuine clusters, the verify loop already closes the rare cascade, and the per-step count/mark scan is pure overhead. Turn on for strongly clustered inputs (the regime it is meant for).