Skip to content

Add an InducedMetric class in mito/geometry#97

Draft
Pawel024 wants to merge 72 commits into
mainfrom
induced-metric
Draft

Add an InducedMetric class in mito/geometry#97
Pawel024 wants to merge 72 commits into
mainfrom
induced-metric

Conversation

@Pawel024

@Pawel024 Pawel024 commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces the InducedMetric class, a geometric abstraction for computing metrics on submanifolds embedded in arbitrary coordinate systems and ambient dimensions.

Key changes:

  • New InducedMetric class that computes the induced metric tensor g_induced = J^T * g_ambient * J and its inverse
  • Volume element support with via sqrt(det(g_induced))
  • Support for contravariant gradients (both vector and scalar) in ambient space via J * (g_inv_induced * dphi_dxi)
  • Volume form support via w = sqrt(det(g_induced)) * (dx^0 ∧ ... ∧ dx^(N-1))
  • New tests, validating metric computation, gradient consistency, and volume element calculations for:
    • segments embedded in 1D, 2D, and 3D coordinate systems
    • triangles embedded in 2D and 3D coordinate systems

@Pawel024 Pawel024 marked this pull request as ready for review February 6, 2026 12:56
@Pawel024 Pawel024 marked this pull request as draft February 6, 2026 15:14
@Pawel024 Pawel024 marked this pull request as ready for review February 6, 2026 15:31
@Pawel024 Pawel024 requested a review from biancagi February 6, 2026 15:31
@Pawel024 Pawel024 marked this pull request as draft February 11, 2026 10:35
biancagi and others added 25 commits March 8, 2026 15:36
After this revision, it is now possible to implement 'geomertry-aware' differential operators. Before this change, since {differential.h} was within {fields}, there would be a cyclic dependency between fields->geometry->fields.
… and use this for integration with the Riemannian formula
biancagi and others added 30 commits May 30, 2026 11:25
The weakform stores a single left hand side block and a single right hand side block, as opposed to a collection of them.
This requires implementing an algebra of blocks, so we can mix and match them before handing them ot the weakform.
Also, this means that blocks do not need to derive from a common parent class any more.
A manifold is now equipped with an {Atlas}, which provides the parametrization of elements in the manifold. The {parametrization} method has hence been removed from {GeometricSimplex}.

Also, now manifolds are able to expose fully-fledged parametrized elements with attached their own metric volume form.

The {Integrator} class is now fully integrated with the differential geometry layer, so it does no longer feel that things are done twice (e.g. element parametrization).

The Poisson benchmark has been temporarily commented out as the function space and blocks still need to adjust to the new design.
Finite elements are now templated with respect to the parametrized element, which provides the geometric context. Finite elements have now access to their own parametrization, which can be used to compute the compute the coordinates of the nodes without resorting to the coordinate system.

The function space class does not store the finite elements any more, but it builds them on the fly upon request by endowing mesh cells with local element geometry information (manifold element) and shape functions.
Make explicit the assumption that the metric space to be built is Euclidean.
… infer the space dimension from the value of {D} of {node_t}
…n and metric volume form by reference

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants