|
peclet.voro 1.0.0
Device-native moving-particle Voronoi dynamics
|
Semi-discrete optimal-transport VOLUME control on the power tessellation — the first energy-minimisation optimiser for building unstructured grids by moving cells to target volumes. More...
#include <cmath>#include <cstdio>#include <Kokkos_Core.hpp>#include <string>#include <vector>#include "peclet/core/amr/momentum.hpp"#include "peclet/core/common/view.hpp"#include "peclet/voro/sdf.hpp"#include "peclet/voro/tessellator.hpp"

Go to the source code of this file.
Classes | |
| struct | peclet::voro::OtResult |
Namespaces | |
| namespace | peclet |
| namespace | peclet::voro |
| namespace | peclet::voro::detail |
Functions | |
| template<class Real > | |
| std::vector< Real > | peclet::voro::detail::toHostVec (const Kokkos::View< Real *, peclet::core::MemSpace > &v) |
| template<class T > | |
| std::vector< T > | peclet::voro::detail::toHostVecT (const Kokkos::View< T *, peclet::core::MemSpace > &v) |
| template<class Real , class Sdf = NoSdf> | |
| OtResult | peclet::voro::otVolumeControl (std::vector< Real > &pos, std::vector< Real > &weight, const std::vector< Real > &vsetIn, const Real L[3], int N, int sw, const Sdf &sdf, int maxNewton, Real tol, Real reg=Real(1e-6), Real damp=Real(1), bool verbose=false) |
Semi-discrete optimal-transport VOLUME control on the power tessellation — the first energy-minimisation optimiser for building unstructured grids by moving cells to target volumes.
DOFs = the power weights w (seed positions fixed). For a target per-cell volume V_set_i we solve for w such that V_i(w) = V_set_i. This is the minimiser of the convex semi-discrete OT energy whose gradient is (V_i − V_set_i); its Newton system is
L(w) δw = (V_set − V(w)), w ← w + α δw,
where L is the graph Laplacian of the cell-adjacency graph with edge weights A_ij/(2 d_ij) (A_ij = shared-face area, d_ij = seed distance) — exactly dV/dw, and exactly the pressure-Poisson operator from docs/power_cell_solver_spec.md §4.2. L is assembled from the tessellation's facet CSR (facetArea, facetConnVec) and solved with the suite's mesh-agnostic sparse-operator + Krylov tooling (peclet::core::amr::MomentumOp / MomentumSolver, Jacobi-preconditioned BiCGStab).
V_set may depend on the SDF (smaller targets near a solid ⇒ grid refinement at boundaries).
The optimiser is host-orchestrated (rebuild the power tessellation each Newton step, assemble + solve); the solve itself runs on the Kokkos device. Depends on Effort 1 (power cells).
LIMITATION (deferred): the PERIODIC min-image power diagram is not an exact partition (Effort 1: volumes off the box by ~1% at non-trivial weights), so the OT system V=V_set is inconsistent below that floor and the Newton residual plateaus at ~1% of the box volume. The Hessian is FD-validated correct and the solve/line-search are sound; a clean converging OT needs an exact-partition power tessellation (a non-periodic / walled domain, or the multi-image gather). For pure-Voronoi position-based volume control that has no such floor, use mesh_optimizer.hpp.