Discrete Exterior Calculus
cartan-dec bridges continuous Riemannian geometry (cartan-core) to discrete
operators for PDE solvers on simplicial meshes. It implements the Desbrun et al.
DEC framework: topology is encoded metric-free in the exterior derivative; all
metric information flows through the Hodge star.
As of v0.3, the crate also provides complex line bundle sections for k-atic fields on 2-manifolds, extrinsic operators (Killing, divergence, gradient) for surfaces in , and an augmented Lagrangian Stokes solver for active nematohydrodynamics on arbitrary manifolds.
The DEC Pipeline
Mesh (vertices, edges, triangles)
|
|-- ExteriorDerivative: d_0: V->E, d_1: E->T (topology only)
|
|-- HodgeStar: *_0, *_1, *_2 (metric: primal/dual volumes)
|
|-- Operators: Laplace-Beltrami, Bochner, Lichnerowicz
| Advection, Divergence
|
|-- line_bundle: Section<K>, BochnerLaplacian<K>, defect charges
|
|-- extrinsic: Killing operator, DIV, GRAD, viscosity Laplacian
|
|-- stokes: Augmented Lagrangian Stokes solver
|
+-- mesh_quality: Delaunay predicates, edge flips, Lloyd smoothing
Modules
| Module | Struct / function | Purpose |
|---|---|---|
mesh | Mesh | K-generic simplicial complex; vertices, edges, triangles, adjacency |
mesh_quality | is_delaunay, make_well_centered | Mesh quality predicates and improvement operators |
mesh_gen | icosphere, torus | Mesh generators with optional well-centred output |
exterior | ExteriorDerivative | Sparse incidence matrices , |
hodge | HodgeStar | Diagonal , , (barycentric or circumcentric dual) |
laplace | Operators | Laplace-Beltrami, Bochner, Lichnerowicz Laplacians |
line_bundle | Section<K>, BochnerLaplacian<K> | Complex sections of line bundles for k-atic fields |
extrinsic | ExtrinsicOperators | Tangent-projector discretisation: Killing, DIV, GRAD, viscosity Laplacian |
stokes | StokesSolverAL | Augmented Lagrangian Stokes solver on triangle meshes |
divergence | apply_divergence | Covariant divergence of vector/tensor fields |
advection | apply_scalar_advection | Upwind covariant advection |
Quick Start
use cartan_dec::{FlatMesh, Operators};
use nalgebra::DVector;
// 4x4 uniform grid on [0,1]^2
let mesh = FlatMesh::unit_square_grid(4);
let ops = Operators::from_mesh(&mesh, &Euclidean::<2>);
// Scalar Laplacian applied to a vertex field
let f = DVector::from_element(mesh.n_vertices(), 1.0_f64);
let lf = ops.apply_laplace_beltrami(&f);Two Discretisation Paths
Intrinsic (line bundles): For 2-manifolds, k-atic fields (nematics, tetratics, hexatics) are represented as complex sections of the line bundle with connection . The discrete Bochner Laplacian uses parallel-transport phase factors and cotangent weights. Topological defect charges are computed exactly (discrete Poincare-Hopf holds).
Extrinsic (Killing operator): For surfaces in (and eventually k-manifolds in ), the tangent-plane projection bypasses connection discretisation entirely. The Killing operator, its adjoints (DIV, GRAD), and the viscosity Laplacian are assembled from FEM gradients and projectors.
Both paths are available on 2-manifolds for cross-validation. The extrinsic path generalises to higher-dimensional manifolds where the complex line bundle structure does not exist.
References
- Desbrun, Hirani, Leok, Marsden. "Discrete Exterior Calculus." arXiv:math/0508341, 2005.
- Hirani. "Discrete Exterior Calculus." PhD thesis, Caltech, 2003.
- Zhu, Saintillan, Chern. "Active nematic fluids on Riemannian 2-manifolds." arXiv:2405.06044, 2024.
- Zhu, Saintillan, Chern. "Stokes flow of an evolving fluid film with arbitrary shape and topology." JFM 1003, R1, 2025.