cartan-dec 0.1.5

Discrete exterior calculus on Riemannian manifolds: simplicial complexes, Hodge operators, and covariant differential operators built on cartan-core
Documentation

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 cartan_dec::{FlatMesh, Operators};
use cartan_manifolds::euclidean::Euclidean;
use nalgebra::DVector;

// Build a 4x4 uniform grid on [0,1]^2.
let mesh = FlatMesh::unit_square_grid(4);
let ops = Operators::from_mesh(&mesh, &Euclidean::<2>);

// Apply the scalar Laplacian to a vertex field.
let f = DVector::from_element(mesh.n_vertices(), 1.0);
let lf = ops.apply_laplace_beltrami(&f);

References

  • Desbrun et al. "Discrete Exterior Calculus." arXiv:math/0508341, 2005.
  • Hirani. "Discrete Exterior Calculus." Caltech PhD thesis, 2003.