PyMetric: A Geometry Informed Array Mathematics Package

Read full text
Authors: Eliza C. Diggins, Daniel R. Wik
Cited by: 0
References: 5

Abstract

PyMetric is a lightweight Python library designed to streamline differential geometry and vector calculus operations in user-defined coordinate systems, with a focus on applications in astrophysics and computational physics.The library was originally created to provide a geometric backend for the Pisces project, an in-development, general purpose astrophysical modeling and initial conditions library, but has since grown into an independent library due to its size and complexity.In many physical modeling tasks, it is both natural and advantageous to work in non-Cartesian coordinate systems that align with the inherent symmetries of the system.These coordinate systems can feature complex geometric structure which, makes the explicit handling of differential operations cumbersome.This is particularly true for exotic coordinate systems (e.g., homoeoidal coordinate systems).PyMetric provides a unified abstraction that decouples the underlying coordinate representation from the operations themselves, allowing users to accurately compute gradients, divergences, Laplacians, and related geometric quantities through a consistent (and coordinate system agnostic) interface.This makes it easier to prototype and scale models in complex geometries without having to rewrite operations for each coordinate system.

Fields of Study & Subjects

Computational Physics and Python Applications Advanced Differential Geometry Research Relativity and Gravitational Theory

Publication details

Journal / source
The Journal of Open Source Software
Volume
11
Issue
117
Pages
8901–8901
Publication date
14 January 2026