Expand description
Mimetic Hodge stars for compatible discretisation.
A compatible discretisation represents the exterior derivative exactly, the
coboundary being combinatorial and satisfying d d = 0 identically, and puts
every metric quantity into the inner product on k-cochains. That inner
product is the only choice the method makes, since the codifferential is its
adjoint,
delta_k = M_{k-1}^-1 d_{k-1}^T M_k Laplacian = d delta + delta dand the Laplacian follows. This crate builds M_k on one simplex.
§What a star has to satisfy
Consistency: the discrete inner product reproduces the exact one whenever
both arguments are constant k-forms on the cell. Writing N for the degrees
of freedom of a basis of those forms, one row per k-face, and G for their
exact Gram matrix, that is N^T M N = G.
Stability: M is positive definite, and spectrally equivalent to its own
diagonal, so the conditioning does not degrade under refinement.
§Why the diagonal answer is not always available
A diagonal star has one unknown per k-face and consistency imposes one equation per symmetric pair of constant forms:
unknowns = C(n+1, k+1) k-faces of an n-simplex
equations = C(n,k) (C(n,k) + 1) / 2 symmetric entries of Gwhich decides the question before any geometry enters:
| n | k | unknowns | equations | diagonal star |
|---|---|---|---|---|
| 2 | 0 | 3 | 1 | a 2-parameter family |
| 2 | 1 | 3 | 3 | unique, and equal to cot/2 |
| 3 | 0 | 4 | 1 | a 3-parameter family |
| 3 | 1 | 6 | 6 | unique, sign not guaranteed |
| 3 | 2 | 4 | 6 | overdetermined, generically none |
Two consequences, each measured in the tests beside this file. At
n = 2, k = 1 the unique diagonal star turns negative exactly when the
triangle is obtuse, so consistency, diagonality and positivity cannot hold at
once. At n = 3, k = 2 no diagonal star is consistent on a general
tetrahedron at all, and at n = 3, k = 1 the unique one is negative on every
tetrahedron of a subdivided cube, which is the ordinary way to mesh a box.
Giving up diagonality restores both properties, which is what this crate
does. local_star is consistent to machine precision and
positive definite on every simplex tested, slivers, needles and caps
included.
Structs§
- Consistency
- The consistency data of one simplex at one form degree.
- Diagonal
Star - What a diagonal star turned out to be on a given simplex.
- Mesh
- A simplicial mesh: vertex coordinates, and cells as vertex index lists.
- Simplex
- A simplex, by the coordinates of its vertices in whatever space it sits in.
Functions§
- assemble_
star - The assembled mimetic star on
k-cochains, dense. - diagonal_
star - The best diagonal star on a simplex, and what is wrong with it.
- k_faces
- The
k-faces of a simplex onn_vertices, as sorted vertex index sets. - local_
star - The mimetic star: consistent by construction and positive definite.
- n_
choose_ k C(n, k), without overflow for the sizes a simplex reaches.