|
peclet.voro 1.0.4
Device-native moving-particle Voronoi dynamics
|
Rung A3: per-cell volume energies e_i(V_i) on the published view — target volume, log-barrier and the ideal-gas free energy the mesh optimiser validated — and their gradient through dV/dn. More...
#include <Kokkos_Core.hpp>#include "peclet/voro/energy/route.hpp"#include "peclet/voro/tessellation_view.hpp"

Go to the source code of this file.
Namespaces | |
| namespace | peclet |
| namespace | peclet::voro |
| Device-native Voronoi tessellation, geometry and finite-volume physics. | |
| namespace | peclet::voro::energy |
Functions | |
| template<class Real > | |
| KOKKOS_INLINE_FUNCTION Real | peclet::voro::energy::dTargetVolume (Real V, Real Vref) |
| e(V) = (V/Vref − 1)²: e' = 2 (V/Vref − 1)/Vref. | |
| template<class Real > | |
| KOKKOS_INLINE_FUNCTION Real | peclet::voro::energy::dLogBarrier (Real V, Real mu) |
| e(V) = −μ log(V/Vref) (log-barrier against collapse): e' = −μ/V. | |
| template<class Real > | |
| KOKKOS_INLINE_FUNCTION Real | peclet::voro::energy::dFreeEnergy (Real V, Real Vref) |
| e(V) = −Vref log V (ideal-gas free energy; equilibrium at equal pressure Vref/V): e' = −Vref/V. | |
| template<class Real , class Policy = Voronoi, class Sdf = NoSdf> | |
| void | peclet::voro::energy::volumeGradientForce (const TessellationView< Real > &view, const Kokkos::View< Real *, peclet::core::MemSpace > &dEdV, const Kokkos::View< Real *, peclet::core::MemSpace > &pos, const Kokkos::View< Real *, peclet::core::MemSpace > &weight, Real L, const Kokkos::View< Real *, peclet::core::MemSpace > &force, const Kokkos::View< Real *, peclet::core::MemSpace > &forceW={}, const Sdf &sdf=Sdf{}) |
Rung A3: per-cell volume energies e_i(V_i) on the published view — target volume, log-barrier and the ideal-gas free energy the mesh optimiser validated — and their gradient through dV/dn.
Any e(V) routes the same way: g_k = e'(V_i) ∂V_i/∂n_k. The build publishes ∂V_i/∂r_k (facetConnect, r_k = 2 n_k the connector), so ∂V/∂n_k = 2·facetConnect for a neighbour facet; a wall facet moves only by translation under the seed-foot model, ∂V/∂n_wall = its outward area vector (facetArea) — exactly the optimiser's wall block.