Topology-Aware DEC
This page documents the cohomology/harmonic layer on closed orientable triangulated surfaces.
Mathematical object
For edge 1-cochains ω ∈ Ω¹, we use the discrete decomposition
ω = dα + δβ + h
with:
dαexact (im(d0)),δβcoexact (im(δ2)),hharmonic (ker(d1) ∩ ker(δ1)).
The harmonic dimension is the first Betti number β1 (for closed genus-g surfaces, β1 = 2g).
Cochain space / degree
β-functions and cycle/cohomology basis: topology of the primal mesh.harmonic_basis,project_*, andhodge_decomposition_full: edge 1-cochains (length = nE).- Potentials:
αon vertices (Ω⁰, lengthnV),βon faces (Ω², lengthnF).
Orientation convention
- Edge orientation is canonical
(i,j)withi < j. - Signed cycle entries:
+emeans traversal along canonical edge orientation,-emeans opposite traversal.
- Inner product is the Hodge metric:
⟨a,b⟩ = a' * star1 * b.
Storage convention
- All 1-forms are dense vectors in edge ordering from
build_topology(mesh).edges. - Harmonic basis is an
nE × β1matrix; each column is one harmonic generator.
API
betti_numbers
first_betti_number
cycle_basis
cohomology_basis_1
harmonic_basis
project_harmonic
project_exact
project_coexact
hodge_decomposition_full
is_closed_form
is_coclosed_form
harmonic_residualsMinimal example
using FrontIntrinsicOps
using LinearAlgebra
mesh = generate_torus(2.0, 0.7, 20, 24)
geom = compute_geometry(mesh)
dec = build_dec(mesh, geom)
b = betti_numbers(mesh)
H = harmonic_basis(mesh, geom, dec)
ω = dec.d0 * [p[3] for p in mesh.points] + 0.4 .* H[:, 1]
decomp = hodge_decomposition_full(ω, mesh, geom, dec; basis=H)
(β=b, nbasis=size(H, 2), residual=norm(decomp.residual))Limitations and non-goals
- Closed orientable surfaces only in v1; open-surface harmonic tools are not implemented here.
- Basis vectors are deterministic by construction, but harmonic sign/basis choices remain topologically equivalent (not unique analytically).
- Implementation is low-order simplicial DEC; no symbolic FEEC framework is introduced.