FrontIntrinsicOps.jl — Documentation

FrontIntrinsicOps.jl is a static-surface PDE toolkit for triangulated front meshes. It implements intrinsic geometry, discrete exterior calculus (DEC), and a full suite of PDE solvers — all working directly on the surface without embedding into a bulk domain.

Release summary for ambient signed distance is available in CHANGELOG.md (v0.5 section).


Contents

Mathematical Background

Detailed derivations and formulas for every module:

DocumentTopic
Mesh types and data structuresCurveMesh, SurfaceMesh, and the primal–dual picture
Topology and incidence matricesEdges, faces, orientation, $d_0$, $d_1$
Discrete geometry and dual areasNormals, areas, edge lengths, barycentric and mixed duals
Discrete exterior calculusHodge stars, exterior derivatives, cochains
Laplace–Beltrami operatorDEC and cotan formulations, sign convention
CurvatureSigned (curve), mean, Gaussian, Gauss–Bonnet
Surface diffusion, Poisson, HelmholtzImplicit time integration, gauge treatment
Scalar transportConservative DEC fluxes, SSP-RK2/3, CFL
Advection–diffusion IMEXSplitting, stability, factory reuse
Reaction–diffusion IMEXθ-scheme, Fisher–KPP, bistable
Tangential vector calculusProjection, surface gradient/divergence, Whitney forms
Hodge decompositionHelmholtz–Hodge, harmonic forms, genus-$g$
Topology-aware DECBetti numbers, cycle basis, harmonic/cohomology operators
GeodesicsHeat-method distance, shortest paths, intrinsic balls, geodesic FPS
Parallel transportFace/vertex tangent frames, connection angle, holonomy
Exterior algebra extensionsWedge, interior product, Lie derivative (Cartan)
FEEC overviewLowest-order FEEC-compatible layer and Whitney complex
Continuum to discrete theoryUnified continuum geometry, DEC, FEEC, and surface-PDE formulation
Whitney formsWhitney 0/1/2 basis and reconstruction conventions
Commuting projectionsCanonical Π0/Π1/Π2 interpolation and commuting checks
Discrete de Rham sequenceExplicit sequence API, diagnostics, and subcomplex verification
High-resolution transportMinmod, van Leer, superbee, SSP-RK2
Open surfaces and boundary conditionsBoundary detection, Dirichlet, Neumann
Caching and performanceSurfacePDECache, in-place buffers, zero-allocation kernels
Mesh generatorsUV-sphere, icosphere, torus, ellipsoid, perturbed sphere
Ambient signed distanceExact point-to-front distance, pseudonormal vs winding sign

API Reference

Concise function signatures and descriptions:

DocumentModule
TypesCurveMesh, SurfaceMesh, SurfaceGeometry, …
Generatorsgenerate_icosphere, generate_torus, generate_ellipsoid, …
Geometry and DECcompute_geometry, build_dec, Hodge stars
PDE solversDiffusion, transport, reaction–diffusion, open surfaces
Diagnosticscheck_mesh, check_dec, Gauss–Bonnet, star1_sign_report
Plotting with MakieOptional weak-extension plotting for CurveMesh / SurfaceMesh

Tutorials

Step-by-step worked examples:

DocumentTopic
Getting startedSphere geometry in five lines
Surface diffusionHeat equation on the sphere
Scalar transportRotating a patch with SSP-RK3
Reaction–diffusionFisher–KPP wave on the sphere
Hodge decompositionDecomposing a 1-form on sphere and torus
Open surfacesPoisson with Dirichlet BC on a cap

Quick reference

using FrontIntrinsicOps

# ── Build mesh ──────────────────────────────────────────────────────────────
mesh = generate_icosphere(1.0, 3)          # level-3 icosphere (~640 verts)
geom = compute_geometry(mesh)              # intrinsic geometry
dec  = build_dec(mesh, geom)               # DEC operators

# ── Geometry diagnostics ────────────────────────────────────────────────────
println("Area   = ", measure(mesh, geom))
println("χ      = ", euler_characteristic(mesh))
println("GB res = ", gauss_bonnet_residual(mesh, geom))

# ── Surface diffusion ───────────────────────────────────────────────────────
u, fac = step_surface_diffusion_backward_euler(mesh, geom, dec, u0, dt, μ)

# ── Reaction–diffusion (Fisher–KPP) ─────────────────────────────────────────
cache = build_pde_cache(mesh, geom, dec; μ=0.1, dt=1e-3, θ=1.0)
reaction = fisher_kpp_reaction(2.0)
for _ in 1:200; step_diffusion_cached!(u, cache, reaction, t); end

# ── Hodge decomposition ──────────────────────────────────────────────────────
α = dec.d0 * u
result = hodge_decompose_1form(mesh, geom, dec, α)
# result.exact  result.coexact  result.harmonic

# ── High-resolution transport ────────────────────────────────────────────────
T_new = step_surface_transport_limited(mesh, geom, dec, topo, T, vel, dt;
                                       limiter=:van_leer, method=:ssprk2)

Design principles

  1. Discrete exterior calculus first — all operators derive from the primal cochain complex $\Omega^0 \xrightarrow{d_0} \Omega^1 \xrightarrow{d_1} \Omega^2$.
  2. No bulk-solver coupling — purely intrinsic; coupling lives in a separate package.
  3. Sparse matrices throughout — every global operator is a SparseMatrixCSC.
  4. Reuse factorizations — linear solves are the bottleneck; the cache layer amortizes factorization cost across many time steps.
  5. Float64 default — parameterised on T<:AbstractFloat; Float32 meshes work.

License

MIT