Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
55f0b7f
formoniq, derham: say multivector where a multivector is meant
luiswirth Jul 29, 2026
2cf2d39
gramian: the metric moves above the algebra it acts on
luiswirth Jul 29, 2026
188d658
regge: the geometry of a complex moves into its own crate
luiswirth Jul 29, 2026
336a368
metric, multialgebra: the two boundaries hold in the manifests
luiswirth Jul 29, 2026
ac0bda3
metric: one metric, and its dual
luiswirth Jul 29, 2026
559fb66
multialgebra: dualizing a symmetric slot carries the multiplicity
luiswirth Jul 30, 2026
e0ae9e2
metric: a metric is the Sym^2 element it is
luiswirth Jul 30, 2026
f814876
regge: squared edge lengths are Sym^2 in the edge basis
luiswirth Jul 30, 2026
f5d541c
multialgebra: name the reciprocal basis
luiswirth Jul 30, 2026
64869c1
coorder: an affine map carries the spaces it runs between
luiswirth Jul 30, 2026
3277b26
metric: a tensor's Gram matrix is not a metric
luiswirth Jul 30, 2026
7e1c519
regge: carry the ambient variance through the padding
luiswirth Jul 30, 2026
aaed201
formoniq: take inner products through the tensor, not its components
luiswirth Jul 30, 2026
2820954
multialgebra: name the blade of a frame
luiswirth Jul 30, 2026
a0547ec
multialgebra: materialize a transport instead of a bare functor matrix
luiswirth Jul 30, 2026
04dc829
realize, studio: transport and measure through the tensor
luiswirth Jul 30, 2026
f1b0356
docs: record that tensorial computation goes through the tensor
luiswirth Jul 30, 2026
086c5af
multialgebra: apply a factored operator without forming it
luiswirth Jul 30, 2026
1365171
derham: name the real reason the Whitney expansion stays factored
luiswirth Jul 30, 2026
e7bffe4
docs: record that a Kronecker product is never formed to be applied
luiswirth Jul 30, 2026
cefa51b
derham: write the Whitney deletion formula once
luiswirth Jul 30, 2026
14d7774
docs: a Tensor is for the geometric space, not the space of unknowns
luiswirth Jul 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 125 additions & 18 deletions CLAUDE.md

Large diffs are not rendered by default.

57 changes: 41 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ members = [
"crates/formoniq",
"crates/derham",
"crates/glatt",
"crates/regge",
"crates/simplicial",
"crates/multiindex",
"crates/multialgebra",
"crates/gramian",
"crates/metric",
"crates/coorder",
"crates/iterative",
"crates/realize",
Expand All @@ -24,10 +25,11 @@ default-members = [
"crates/formoniq",
"crates/derham",
"crates/glatt",
"crates/regge",
"crates/simplicial",
"crates/multiindex",
"crates/multialgebra",
"crates/gramian",
"crates/metric",
"crates/coorder",
"crates/iterative",
"crates/realize",
Expand Down
60 changes: 32 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,25 @@ is enforced by the crate boundaries rather than by convention.
- **[`multiindex`](crates/multiindex/README.md)**:
colexicographic combinatorics of finite index sets,
with ranked combinations, signed index algebra and radix multi-indices.
- **[`gramian`](crates/gramian/README.md)**:
inner-product and metric structure in a basis,
with Gram matrices, pseudo-Riemannian metrics of arbitrary signature
and the induced distance geometry.
- **[`coorder`](crates/coorder/README.md)**:
affine coordinates tagged by the space they live in,
so the maps between coordinate spaces are explicit and their confusion does not compile.
- **[`multialgebra`](crates/multialgebra/README.md)**:
the exterior and symmetric algebras as one construction, and tensor products of them,
with the variance of each slot deciding pullback against pushforward,
the musical isomorphisms and which Gramian measures it.
metric-free throughout,
with the variance of each slot deciding pullback against pushforward
and which metric measures it.
- **[`metric`](crates/metric/README.md)**:
pseudo-Riemannian metrics of arbitrary signature and the operations needing one:
the inner product, the Hodge star and the musical isomorphisms,
with g and g⁻¹ one datum rather than a stored pair.
- **[`simplicial`](crates/simplicial/README.md)**:
the simplicial manifold, keeping pure-combinatorial topology separate from geometry,
which enters intrinsically as signed squared edge lengths,
with coordinates and per-cell metrics as sources converting into them.
the simplicial complex and its piecewise-affine atlas, metric-free throughout,
with a geometry a genuinely separate input rather than a field on the mesh.
- **[`regge`](crates/regge/README.md)**:
that geometry: signed squared edge lengths as the primitive,
with coordinates and per-cell metrics as sources converting into them,
so nothing in the core path requires an embedding.
- **[`glatt`](crates/glatt/README.md)**:
the continuum manifold that the simplicial one approximates,
with parametrizations and analytic differential-form data on them.
Expand All @@ -101,7 +105,7 @@ and are usable on their own.
`simplicial` carries combinatorial topology
(boundary operators, homology, Betti numbers) alongside intrinsic Regge geometry,
none of which needs a differential form.
`multiindex` is colex-ranked combinatorics, `gramian` is metric linear algebra,
`multiindex` is colex-ranked combinatorics, `metric` is pseudo-Riemannian linear algebra,
and `glatt` is continuum differential geometry.
FEEC is what `derham` and `formoniq` build on top,
not something the layers below are entangled with.
Expand Down Expand Up @@ -130,13 +134,13 @@ The `Scene` carries the engine's own types (`Complex`, `MeshCoords`, `Cochain`)
rather than a lossy export,
so coloring, displacement and the choice of render mark stay decisions made on the real object.
The bake then reduces a complex to what a rasterizer draws:
simplices of dimension ≤ 2 embedded in R³, with winding and position made explicit.
simplices of dimension ≤ 2 embedded in R³, with winding and position made explicit.
Downstream of the bake there are no FEEC types, only ambient geometry.

Ambient dimension is fixed at 3, the native space of the GPU,
while intrinsic dimension and form grade stay general within it.
Two reductions carry this.
Form grade reduces to a render mark through the reduced grade min(k, n−k):
Form grade reduces to a render mark through the reduced grade min(k, n−k):
a scalar density coloring, a glyph or particle line field, a standing-wave displacement height.
Intrinsic dimension reduces to a render primitive min(n, 2):
a surface to wound triangles, a curve to segments, a point set to points,
Expand All @@ -149,7 +153,7 @@ distinguished only by material data.
## Origin

The first version was developed as the
[BSc thesis](https://github.com/luiswirth/bsc-thesis) of Luis Wirth at ETH Zürich,
[BSc thesis](https://github.com/luiswirth/bsc-thesis) of Luis Wirth at ETH Zürich,
supervised by Prof. Dr. Ralf Hiptmair.
It focused on the elliptic Hodge-Laplace problem with the first-order Whitney basis
([arXiv:2506.02429](https://arxiv.org/abs/2506.02429)).
Expand Down Expand Up @@ -178,21 +182,21 @@ Classical finite element methods are usually written for a fixed dimension,
in explicit ambient coordinates,
with separate machinery for scalar and vector fields,
and with gradient, curl and divergence each treated on their own terms.
Conforming vector-valued elements, the Nédélec and Raviart-Thomas families,
Conforming vector-valued elements, the Nédélec and Raviart-Thomas families,
were originally constructed case by case and are intricate to derive and implement.

FEEC, developed by Arnold, Falk and Winther,
replaces that patchwork with one construction over differential forms.
Gradient, curl and divergence are one exterior derivative d.
The scalar and vector Laplacians are one Hodge-Laplace operator Δ = dδ + δd.
The scalar and vector Laplacians are one Hodge-Laplace operator Δ = dδ + δd.
Nodal, edge and face elements are Whitney forms at different degrees.
Once the vector calculus is gone,
the same construction works in any dimension and on domains of any topology.

The organizing idea is to discretize the whole de Rham complex at once
rather than each function space in isolation,
and to keep its structure exact under discretization:
the nilpotency d∘d = 0, the exactness relations, and the cohomology.
the nilpotency d∘d = 0, the exactness relations, and the cohomology.
A discretization that preserves these is stable and convergent,
and reproduces the topology of the domain rather than recovering it approximately.
This is what "structure-preserving" means here,
Expand All @@ -205,21 +209,21 @@ The first-order Whitney forms, indexed only by form degree k,
recover the classical families as special cases:

- k = 0: Lagrange (nodal) elements
- k = 1: Nédélec edge elements
- k = 1: Nédélec edge elements
- k = n-1: Raviart-Thomas elements
- k = n: piecewise-constant discontinuous elements

Scalar and vector FEM, edge and face elements,
are one construction taken at different degrees
rather than four separately implemented families.
In the FEEC classification the Whitney space is the lowest-order trimmed polynomial space,
`WΛᵏ = P⁻₁Λᵏ`.
Higher-order `P⁻ᵣΛᵏ` elements are a direction being explored.
`WΛᵏ = P⁻₁Λᵏ`.
Higher-order `P⁻ᵣΛᵏ` elements are a direction being explored.

## Intrinsic geometry

Most finite element implementations assume an embedding:
the domain lives in Rᴺ and geometry is read from vertex coordinates.
the domain lives in Rá´º and geometry is read from vertex coordinates.
formoniq does not.
A domain is an abstract simplicial complex carrying a pseudo-Riemannian metric
supplied intrinsically, from Regge-style signed squared edge lengths,
Expand All @@ -243,7 +247,7 @@ hyperbolic through the signature alone.
The Hodge-Laplace operator is singular.
Its kernel is the space of harmonic forms,
and by Hodge's theorem that kernel is isomorphic to the de Rham cohomology of the domain,
with dimension the Betti number βₖ, the number of k-dimensional holes.
with dimension the Betti number βₖ, the number of k-dimensional holes.
Topology therefore governs solvability:
existence and uniqueness of the source problem hold only modulo the harmonics.

Expand All @@ -257,8 +261,8 @@ On a sphere it finds none.
The mixed formulation of Arnold, Falk and Winther makes this structure explicit.
It introduces the codifferential weakly,
so that only the exterior derivative appears in the discrete spaces
(finite element spaces conforming to both HΛᵏ and its adjoint are hard to build),
carries the harmonic part as an unknown, and fixes the gauge u ⊥ ℋᵏ.
(finite element spaces conforming to both HΛᵏ and its adjoint are hard to build),
carries the harmonic part as an unknown, and fixes the gauge u ⊥ ℋᵏ.
The result is a well-posed saddle-point system.

## Structure preservation
Expand All @@ -267,17 +271,17 @@ Two maps connect the continuous and discrete complexes.
The de Rham map R discretizes a form by integrating it over each simplex, giving a cochain.
The Whitney map W reconstructs a cochain into a piecewise-polynomial form by interpolation.
Both commute with the exterior derivative,
so the Whitney forms `WΛᵏ` are a subcomplex of the de Rham complex
and the projection Πₕ = W∘R commutes with d.
so the Whitney forms `WΛᵏ` are a subcomplex of the de Rham complex
and the projection Πₕ = W∘R commutes with d.

On the discrete side the exterior derivative is purely topological:
the transpose of the signed incidence matrix of the mesh, with no metric involved,
dual to the simplicial boundary operator under the chain-cochain pairing.
The boundary squares to zero (∂∘∂ = 0) exactly as the exterior derivative does (d∘d = 0).
The boundary squares to zero (∂∘∂ = 0) exactly as the exterior derivative does (d∘d = 0).

These identities are the test suite.
Nilpotency, Whitney's theorem R∘W = id, Stokes' theorem R∘d = d∘R,
the commuting-subcomplex property d∘W = W∘d,
Nilpotency, Whitney's theorem R∘W = id, Stokes' theorem R∘d = d∘R,
the commuting-subcomplex property d∘W = W∘d,
the functoriality of the exterior power and the involution of the Hodge star
are stated as theorems and swept over all dimensions and grades.
The suite is a machine-checked statement of the mathematics
Expand Down
Loading