|
peclet.voro 1.0.4
Device-native moving-particle Voronoi dynamics
|
The ONE seed-foot SDF wall chain (Voronoi methods plan, rung A3) + the wall interfacial energy on the published view. More...
#include <Kokkos_Core.hpp>#include <type_traits>#include "peclet/voro/energy/route.hpp"#include "peclet/voro/sdf.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 , class Policy = Voronoi, class Sdf = NoSdf> | |
| Real | peclet::voro::energy::wallEnergyForce (const TessellationView< Real > &view, const Kokkos::View< int *, peclet::core::MemSpace > &types, const Kokkos::View< Real *, peclet::core::MemSpace > &sigmaS, const Sdf &sdf, 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={}) |
The ONE seed-foot SDF wall chain (Voronoi methods plan, rung A3) + the wall interfacial energy on the published view.
A wall facet (pnbr == kBoundaryFacet) has no partner seed: its plane moves only through the cell's own seed. The seed-foot model takes the wall as the tangent plane at the seed's foot point on φ = 0, foot vector n(x) = −φ ∇φ/|∇φ|² (the Newton step to φ(x+n) = 0, valid for a GENERAL level-set function, not only |∇φ| = 1). Its Jacobian is dn/dx = −û ûᵀ − (φ/|∇φ|) (I − û ûᵀ) H, û = ∇φ/|∇φ|, H = ∇²φ, whose leading term is |∇φ|-INDEPENDENT (the |∇φ|² cancels), so a geometry gradient g_w aggregated over the cell's wall planes routes to the seed as f_self += −(û·g_w) û − (φ/|∇φ|) H (g_w − (û·g_w) û). Exact for a flat wall (H = 0, one plane); first-order for a curved wall (the clip approximates the curve by several vertex-anchored planes, modelled as one effective seed-foot plane).
The chain itself is sdf.hpp::sdfWallChain (the single source): sdf.hpp::addSdfWallForce, the host and device mesh optimisers and the energy terms here all call it. (Before A3 the chain lived in three copies; addSdfWallForce's carried an extra |∇φ| factor from the |∇φ| = 1 shortcut.)