cartan

Laplacians

Operators assembles and applies three discrete Laplacians from a mesh: the scalar Laplace-Beltrami, the vector Bochner Laplacian, and the tensor Lichnerowicz Laplacian.

Summary

OperatorMethodInputUse case
Laplace-Beltrami apply_laplace_beltramivertex scalar fieldHeat equation, Poisson
Bochner apply_bochner_laplacianedge 1-formVector diffusion
Lichnerowicz apply_lichnerowicz_laplacian2-form / tensorQ-tensor PDEs

Construction

use cartan_dec::{Mesh, Operators};
 
let mesh = Mesh::unit_square_grid(8);
let ops  = Operators::from_mesh(&mesh);
// ops precomputes all sparse matrices: d0, d1, star0, star1, star2, and Laplacians

Laplace-Beltrami

The scalar Laplacian :

use nalgebra::DVector;
 
let f  = DVector::from_fn(mesh.n_vertices(), |i, _| {
    let [x, y] = mesh.vertices[i];
    x * x + y * y   // f(x,y) = x² + y²,  Δf = 4 (constant)
});
 
let lf = ops.apply_laplace_beltrami(&f);
// lf[i] ≈ 4 at interior vertices (boundary effects at boundary vertices)

Heat equation step:

let dt = 0.01_f64;
let f_next = &f + dt * ops.apply_laplace_beltrami(&f);

Bochner Laplacian

The vector Laplacian acting on discrete 1-forms (edge fields):

let alpha = DVector::from_element(mesh.n_edges(), 1.0_f64);
// Curvature correction: None = use geometric curvature from mesh
let lalpha = ops.apply_bochner_laplacian(&alpha, None);

The second argument is an Option<f64> override for the curvature correction term. Pass Some(k) to use a uniform curvature everywhere; None computes it from the mesh geometry.

Lichnerowicz Laplacian

The tensor Laplacian , relevant for Q-tensor nematohydrodynamics (volterra):

let q = DVector::from_element(mesh.n_edges(), 0.0_f64);
// curvature_correction: None = geometric Ric from mesh
let lq = ops.apply_lichnerowicz_laplacian(&q, None);

On flat domains (), Lichnerowicz = Bochner.

Formula Reference

where is the (discrete) scalar curvature at each edge (from Gauss-Bonnet via angle defect at vertices).

Numerical Notes

Positive semi-definiteness: is positive semi-definite on well-centered meshes. The null space is spanned by the constant function.

Boundary conditions: on a mesh with boundary, apply_laplace_beltrami returns the raw operator values including boundary vertices. Apply Dirichlet/Neumann conditions by zeroing or modifying the appropriate rows before time-stepping.

Precomputation: Operators::from_mesh builds all sparse matrices once. Repeated applications are cheap (sparse matrix-vector products).

Applications

  • Heat diffusion:
  • Poisson equation: (via sparse solve)
  • volterra: Beris-Edwards Q-tensor evolution uses
  • Spectral geometry: eigenmodes of for shape analysis