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.
翻译:本文介绍OGRe,一个用于张量计算的现代化Mathematica软件包,兼具强大功能与用户友好性。该软件包适用于数学和物理中需要张量计算的多种场景,尤其适合于广义相对论研究。通过采用面向对象的设计范式,OGRe能够轻松计算任意复杂的张量公式,并在后台按需自动完成指标构型与坐标系之间的转换,从根本上杜绝用户以不一致方式组合张量导致的错误。其他功能包括:多种形式的张量显示、曲率张量与测地线方程的自动计算、会话间张量的便捷导入导出、优化算法与并行化处理以提升性能等。