{"title":"OGRePy: An Object-Oriented General Relativity Package for Python","authors":"Barak Shoshany","doi":"arxiv-2409.03803","DOIUrl":null,"url":null,"abstract":"We present OGRePy, the official Python port of the popular Mathematica tensor\ncalculus package OGRe (Object-Oriented General Relativity) - a powerful, yet\nuser-friendly, tool for advanced tensor calculations in mathematics and\nphysics, especially suitable for general relativity. The Python port uses the\nsame robust and performance-oriented algorithms as the original package, and\nretains its core design principles. However, its truly object-oriented\ninterface, enabled by Python, is more intuitive and flexible than the original\nMathematica implementation. It utilizes SymPy for symbolic computations and\nJupyter as a notebook interface. OGRePy allows calculating arbitrary tensor\nformulas using any combination of addition, multiplication by scalar, trace,\ncontraction, partial derivative, covariant derivative, and permutation of\nindices. Transformations of the tensor components between different index\nconfigurations and/or coordinate systems are performed seamlessly behind the\nscenes as needed, eliminating user error due to combining incompatible\nrepresentations, and guaranteeing consistent results. In addition, the package\nprovides facilities for easily calculating various curvature tensors and\ngeodesic equations in multiple representations. This paper presents the main\nfeatures of the package in great detail, including many examples of its use in\nthe context of general relativity research.","PeriodicalId":501113,"journal":{"name":"arXiv - MATH - Differential Geometry","volume":"30 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-09-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - MATH - Differential Geometry","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2409.03803","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
We present OGRePy, the official Python port of the popular Mathematica tensor
calculus package OGRe (Object-Oriented General Relativity) - a powerful, yet
user-friendly, tool for advanced tensor calculations in mathematics and
physics, especially suitable for general relativity. The Python port uses the
same robust and performance-oriented algorithms as the original package, and
retains its core design principles. However, its truly object-oriented
interface, enabled by Python, is more intuitive and flexible than the original
Mathematica implementation. It utilizes SymPy for symbolic computations and
Jupyter as a notebook interface. OGRePy allows calculating arbitrary tensor
formulas using any combination of addition, multiplication by scalar, trace,
contraction, partial derivative, covariant derivative, and permutation of
indices. Transformations of the tensor components between different index
configurations and/or coordinate systems are performed seamlessly behind the
scenes as needed, eliminating user error due to combining incompatible
representations, and guaranteeing consistent results. In addition, the package
provides facilities for easily calculating various curvature tensors and
geodesic equations in multiple representations. This paper presents the main
features of the package in great detail, including many examples of its use in
the context of general relativity research.