Hodge Star
HodgeStar computes the three diagonal Hodge star operators , ,
from primal and dual volumes. The Hodge star encodes all metric
information; combined with the metric-free exterior derivative it produces all
geometric operators (Laplacian, divergence, etc.).
Summary
| Operator | Input | Output | Definition |
|---|---|---|---|
| 0-form (vertex) | dual 2-form | dual vertex area | |
| 1-form (edge) | dual 1-form | dual edge length / primal edge length | |
| 2-form (triangle) | dual 0-form | 1 / triangle area |
All three are diagonal: stored as DVector<f64>, applied via component_mul.
Construction
use cartan_dec::{Mesh, HodgeStar};
let mesh = Mesh::unit_square_grid(4);
let hodge = HodgeStar::from_mesh(&mesh);Applying the Hodge Star
HodgeStar stores the diagonals as DVector<f64>; apply via component_mul:
use nalgebra::DVector;
// ⋆₀: vertex 0-form → dual 2-form (element-wise multiply by star0)
let f = DVector::from_element(mesh.n_vertices(), 1.0_f64);
let sf = f.component_mul(&hodge.star0);
// ⋆₁: edge 1-form → dual 1-form
let alpha = DVector::from_element(mesh.n_edges(), 1.0_f64);
let salpha = alpha.component_mul(&hodge.star1);
// ⋆₂: triangle 2-form → dual 0-form
let omega = DVector::from_element(mesh.n_triangles(), 1.0_f64);
let somega = omega.component_mul(&hodge.star2);
// Inverse: divide by the diagonal
let f_back = sf.component_div(&hodge.star0);
assert!((f_back - f).norm() < 1e-12);Formula Reference
Diagonal entries:
where is the dual vertex area (sum of of adjacent triangle areas for barycentric dual, or circumcentric area for circumcentric dual), is the dual edge length (distance between circumcenters of adjacent triangles), and is the triangle area.
Inverse (from for ):
Numerical Notes
Well-centered condition: entries are positive iff all dual edge lengths , which holds iff the triangulation is well-centered (all circumcenters inside their triangles). A negative entry indicates an obtuse triangle; the Laplacian will not be positive semi-definite.
Building operators: the Laplace-Beltrami is
(using as a weight matrix). Operators::from_mesh assembles this
automatically.
Applications
- Building the Laplace-Beltrami operator from and
- Hodge decomposition of discrete vector fields
- Converting between primal and dual mesh quantities