1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// ~/cartan/cartan-dec/src/lib.rs
//! # 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` — sparse d₀ (0-forms to 1-forms) and d₁ (1-forms to 2-forms) |
//! | [`hodge`] | `HodgeStar` — diagonal ⋆ operators indexed by degree |
//! | [`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
//!
//! ```rust,no_run
//! 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.
pub use ;
pub use ;
pub use DecError;
pub use ExteriorDerivative;
pub use HodgeStar;
pub use Operators;
pub use cartesian_3d_connection;
pub use ;
pub use ;