OGRe: An Object-Oriented General Relativity Package for Mathematica

📅 2021-09-01
🏛️ Journal of Open Source Software
📈 Citations: 21
Influential: 1
📄 PDF

career value

179K/year
🤖 AI Summary
Existing Mathematica tensor tools suffer from poor usability, error-prone index management, and cumbersome coordinate transformations in differential geometric applications such as general relativity. To address these limitations, we design and implement an object-oriented Mathematica tensor package grounded in a novel object-oriented tensor modeling paradigm. Our approach enforces automatic index configuration conversion, coordinate-system adaptation, and runtime tensor-type consistency verification—thereby eliminating index misuse at the architectural level. The package integrates symbolic computation, parallel optimization, and a dedicated tensor algebra engine, enabling fully automated derivation of arbitrarily complex tensor expressions and efficient computation of curvature tensors and geodesic equations. Benchmarking demonstrates substantial improvements in computational efficiency. The software is open-source and has been widely adopted in both pedagogical and research settings.
📝 Abstract
We present OGRe, a modern Mathematica package for tensor calculus, designed to be both powerful and user-friendly. The package can be used in a variety of contexts where tensor calculations are needed, in both mathematics and physics, but it is especially suitable for general relativity. By implementing an object-oriented design paradigm, OGRe allows calculating arbitrarily complicated tensor formulas easily, and automatically transforms between index configurations and coordinate systems behind the scenes as needed, eliminating user errors by making it impossible for the user to combine tensors in inconsistent ways. Other features include displaying tensors in various forms, automatic calculation of curvature tensors and geodesic equations, easy importing and exporting of tensors between sessions, optimized algorithms and parallelization for improved performance, and more.
Problem

Research questions and friction points this paper is trying to address.

Develops a Mathematica package for tensor calculus
Focuses on general relativity with object-oriented design
Automates tensor transformations to prevent user errors
Innovation

Methods, ideas, or system contributions that make the work stand out.

Object-oriented design for tensor calculus
Automatic index and coordinate transformations
Optimized algorithms with parallelization features