cartan-dec
Discrete exterior calculus (DEC) on Riemannian manifolds.
Bridges continuous geometry (cartan-core) to discrete operators for PDE
solvers on simplicial meshes. All metric information flows through the
Hodge star; topology is encoded in the metric-free exterior derivative.
Modules
| Module | Contents |
|---|---|
[mesh] |
Mesh<M,K,B> generic simplicial complex; FlatMesh = flat 2D triangular mesh |
[exterior] |
ExteriorDerivative — d₀ (0-forms to 1-forms) and d₁ (1-forms to 2-forms) |
[hodge] |
HodgeStar — diagonal ⋆₀, ⋆₁, ⋆₂ from primal/dual volumes |
[laplace] |
Operators — Laplace-Beltrami, Bochner, and Lichnerowicz Laplacians |
[advection] |
Upwind covariant advection for scalar and vector fields |
[divergence] |
Discrete covariant divergence of vector and tensor fields |
[error] |
DecError — error type for DEC operations |
Quick start
use ;
use Euclidean;
use DVector;
// Build a 4x4 uniform grid on [0,1]^2.
let mesh = unit_square_grid;
let ops = from_mesh;
// Apply the scalar Laplacian to a vertex field.
let f = from_element;
let lf = ops.apply_laplace_beltrami;
References
- Desbrun et al. "Discrete Exterior Calculus." arXiv:math/0508341, 2005.
- Hirani. "Discrete Exterior Calculus." Caltech PhD thesis, 2003.