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:
| Document | Topic |
|---|---|
| Mesh types and data structures | CurveMesh, SurfaceMesh, and the primal–dual picture |
| Topology and incidence matrices | Edges, faces, orientation, $d_0$, $d_1$ |
| Discrete geometry and dual areas | Normals, areas, edge lengths, barycentric and mixed duals |
| Discrete exterior calculus | Hodge stars, exterior derivatives, cochains |
| Laplace–Beltrami operator | DEC and cotan formulations, sign convention |
| Curvature | Signed (curve), mean, Gaussian, Gauss–Bonnet |
| Surface diffusion, Poisson, Helmholtz | Implicit time integration, gauge treatment |
| Scalar transport | Conservative DEC fluxes, SSP-RK2/3, CFL |
| Advection–diffusion IMEX | Splitting, stability, factory reuse |
| Reaction–diffusion IMEX | θ-scheme, Fisher–KPP, bistable |
| Tangential vector calculus | Projection, surface gradient/divergence, Whitney forms |
| Hodge decomposition | Helmholtz–Hodge, harmonic forms, genus-$g$ |
| Topology-aware DEC | Betti numbers, cycle basis, harmonic/cohomology operators |
| Geodesics | Heat-method distance, shortest paths, intrinsic balls, geodesic FPS |
| Parallel transport | Face/vertex tangent frames, connection angle, holonomy |
| Exterior algebra extensions | Wedge, interior product, Lie derivative (Cartan) |
| FEEC overview | Lowest-order FEEC-compatible layer and Whitney complex |
| Continuum to discrete theory | Unified continuum geometry, DEC, FEEC, and surface-PDE formulation |
| Whitney forms | Whitney 0/1/2 basis and reconstruction conventions |
| Commuting projections | Canonical Π0/Π1/Π2 interpolation and commuting checks |
| Discrete de Rham sequence | Explicit sequence API, diagnostics, and subcomplex verification |
| High-resolution transport | Minmod, van Leer, superbee, SSP-RK2 |
| Open surfaces and boundary conditions | Boundary detection, Dirichlet, Neumann |
| Caching and performance | SurfacePDECache, in-place buffers, zero-allocation kernels |
| Mesh generators | UV-sphere, icosphere, torus, ellipsoid, perturbed sphere |
| Ambient signed distance | Exact point-to-front distance, pseudonormal vs winding sign |
API Reference
Concise function signatures and descriptions:
| Document | Module |
|---|---|
| Types | CurveMesh, SurfaceMesh, SurfaceGeometry, … |
| Generators | generate_icosphere, generate_torus, generate_ellipsoid, … |
| Geometry and DEC | compute_geometry, build_dec, Hodge stars |
| PDE solvers | Diffusion, transport, reaction–diffusion, open surfaces |
| Diagnostics | check_mesh, check_dec, Gauss–Bonnet, star1_sign_report |
| Plotting with Makie | Optional weak-extension plotting for CurveMesh / SurfaceMesh |
Tutorials
Step-by-step worked examples:
| Document | Topic |
|---|---|
| Getting started | Sphere geometry in five lines |
| Surface diffusion | Heat equation on the sphere |
| Scalar transport | Rotating a patch with SSP-RK3 |
| Reaction–diffusion | Fisher–KPP wave on the sphere |
| Hodge decomposition | Decomposing a 1-form on sphere and torus |
| Open surfaces | Poisson 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
- Discrete exterior calculus first — all operators derive from the primal cochain complex $\Omega^0 \xrightarrow{d_0} \Omega^1 \xrightarrow{d_1} \Omega^2$.
- No bulk-solver coupling — purely intrinsic; coupling lives in a separate package.
- Sparse matrices throughout — every global operator is a
SparseMatrixCSC. - Reuse factorizations — linear solves are the bottleneck; the cache layer amortizes factorization cost across many time steps.
- Float64 default — parameterised on
T<:AbstractFloat;Float32meshes work.
License
MIT