Einstein
Documentation for Einstein.
I'm still actively developing it and migrating code from private repositories to this one, so it may currently lack some features.
Motivation and Purpose
After developing hundreds of PDE solvers for various projects, I decided to create Einstein.jl
because I couldn't find a library that was both highly convenient and effective for solving partial differential equations (PDEs) in the context of general relativity (GR).
When solving GR PDEs in spherical symmetry or even axisymmetry, the requirements are often far more demanding than in 3+1 cases. These include the need for very long-time simulations, conservation of quantities, highly accurate late-time behavior, and precise computation of quasinormal modes. While I have addressed these challenges individually in the past, I grew tired of copying and pasting solutions from old repositories. Instead, I decided to develop a comprehensive, feature-rich, and highly efficient library. This is my answer to those challenges.
Description
Einstein.jl is a high-performance suite designed to compute arbitrary-precision solutions of PDEs in GR. It is planned to support solving the following built-in equations (some of which were developed for previous projects and will be ported to this library):
Spatial Discretization
- [x] Chebyshev collocation at Chebyshev points of the first and second kinds (Most of algorithms are translated from Chebfun)
- [x] Finite difference method
- [x] Hermite finite difference method
- [x] Rectangular collocation method (Most of algorithms are translated from Chebfun)
- [x] Ultraspherical spectral method (Most of algorithms are translated from Chebfun)
- For boundary value problems, I recommend using ApproxFun.jl.
- [ ] Ultraspherical rectangular collocation
General Utilities
- [x] Correctly rounded floating-point dot/sum using xsum or Kahan summation
- [x] Spin-weighted spheroidal harmonics using the Cook-Zalutskiy spectral method
Quasinormal Modes
- [ ] Compute quasinormal modes for the Schwarzschild black hole using the Regge-Wheeler-Zerilli equation.
- [ ] Continued fraction method to determine the eigenvalue
- [x] Ultraspherical spectral method in hyperboloidal coordinates to determine the eigenfunction.
- [x] Dolan and Ottewill Regge poles expansion method
- [ ] WKB approximation
- [ ] Direct integration method
- [x] Compute quasinormal modes for the Kerr black hole using the Teukolsky equation.
- [x] Continued fraction method for the radial equation (translated from duetosymmetry/qnm)
- [x] Cook-Zalutskiy spectral method for the angular sector (translated from duetosymmetry/qnm)
- [x] Direct integration method for the radial equation
- [x] Ultraspherical spectral method in hyperboloidal coordinates to determine the eigenfunction.
- Utilities
- [x] Modified Lentz method for continued fractions
- [ ] WKB approximation for general potentials
- [ ] Compute quasinormal modes for the Schwarzschild black hole using the Regge-Wheeler-Zerilli equation.
Time Domain
Spherical Symmetry
- [ ] Regge-Wheeler-Zerilli equation
- [ ] Hyperboloidal coordinates
- [ ] Kerr-Schild coordinates
- [ ] Tortoise coordinates
- [ ] Klein-Gordon equation
- [ ] Hyperboloidal coordinates
- [ ] Kerr-Schild coordinates
- [ ] Tortoise coordinates
- [ ] Einstein equations with a scalar field
- [ ] Z4 formulation
- [ ] Hyperboloidal coordinates
- [ ] Regge-Wheeler-Zerilli equation
Axisymmetry
- [ ] Teukolsky equation
- [ ] Hyperboloidal coordinates
- [ ] Kerr-Schild coordinates
- [ ] Tortoise coordinates
- [ ] Klein-Gordon equation
- [ ] Hyperboloidal coordinates
- [ ] Kerr-Schild coordinates
- [ ] Tortoise coordinates
- [ ] Teukolsky equation
While the ChebyshevSuite
is inspired by algorithms from Chebfun, it has been significantly enhanced in this package to improve performance and support arbitrary-precision calculations.
Acknowledgments
This package is inspired by the following projects, and some of the algorithms are translated / adapted from them:
- Chebfun
- JuliaApproximation/ApproxFun.jl
- duetosymmetry/qnm
- SciML/MethodOfLines.jl
- Neal/xsum
- JuliaMath/KahanSummation.jl
- tomtrogdon/URCMethod.jl
The author would like to thank the developers of these projects for their contributions to the scientific computing community.
Other Related Projects
- lucass-carneiro/QuasinormalModes.jl: A Julia package for computing discrete eigenvalues of second-order ODEs: This package focuses on computing quasinormal modes using the
Asymptotic Iteration Method
. However, as far as I know, no one has proven that theAsymptotic Iteration Method
is guaranteed to converge. So why not use more reliable methods? In any case, it is good to have one more method to compare against. - JLRipley314/TeukolskyQNMFunctions.jl: Computes quasinormal modes and eigenfunctions of the Teukolsky equation in HPHC coordinates.: Justin Ripley has developed a package that computes the quasinormal modes of the Teukolsky equation based on his own paper. We also follow his paper for the Teukolsky equation in hyperboloidal coordinates.
Einstein.ChebyshevSuite.ChebyshevGaussGrid
Einstein.ChebyshevSuite.ChebyshevLobattoGrid
Einstein.ChebyshevSuite.ChebyshevGaussCoeffs2ValsPlan
Einstein.ChebyshevSuite.ChebyshevGaussVals2CoeffsPlan
Einstein.ChebyshevSuite.ChebyshevLobattoCoeffs2ValsPlan
Einstein.ChebyshevSuite.ChebyshevLobattoVals2CoeffsPlan
Einstein.FiniteDifferenceSuite.LocalBarycentricInterpolation
Einstein.Utils.BarycentricInterpolation
Einstein.Utils.SWSFun
Einstein.ChebyshevSuite.cheb_filter_matrix
Einstein.ChebyshevSuite.cheb_gauss_angles
Einstein.ChebyshevSuite.cheb_gauss_barycentric_weights
Einstein.ChebyshevSuite.cheb_gauss_coeffs2vals_matrix
Einstein.ChebyshevSuite.cheb_gauss_differentiation_matrix
Einstein.ChebyshevSuite.cheb_gauss_integration_matrix
Einstein.ChebyshevSuite.cheb_gauss_points
Einstein.ChebyshevSuite.cheb_gauss_quadrature_weights
Einstein.ChebyshevSuite.cheb_gauss_vals2coeffs_matrix
Einstein.ChebyshevSuite.cheb_lobatto_angles
Einstein.ChebyshevSuite.cheb_lobatto_barycentric_weights
Einstein.ChebyshevSuite.cheb_lobatto_coeffs2vals_matrix
Einstein.ChebyshevSuite.cheb_lobatto_differentiation_matrix
Einstein.ChebyshevSuite.cheb_lobatto_integration_matrix
Einstein.ChebyshevSuite.cheb_lobatto_points
Einstein.ChebyshevSuite.cheb_lobatto_quadrature_weights
Einstein.ChebyshevSuite.cheb_lobatto_vals2coeffs_matrix
Einstein.ChebyshevSuite.cheb_series_chop
Einstein.ChebyshevSuite.cheb_series_derivative!
Einstein.ChebyshevSuite.cheb_series_evaluate
Einstein.ChebyshevSuite.cheb_series_filter_weights_exp
Einstein.ChebyshevSuite.cheb_series_integrate!
Einstein.ChebyshevSuite.cheb_series_integration_matrix
Einstein.FiniteDifferenceSuite.fdm_boundary_weights
Einstein.FiniteDifferenceSuite.fdm_boundary_width
Einstein.FiniteDifferenceSuite.fdm_central_weights
Einstein.FiniteDifferenceSuite.fdm_central_width
Einstein.FiniteDifferenceSuite.fdm_derivative_operator
Einstein.FiniteDifferenceSuite.fdm_dissipation_boundary_weights
Einstein.FiniteDifferenceSuite.fdm_dissipation_boundary_width
Einstein.FiniteDifferenceSuite.fdm_dissipation_operator
Einstein.FiniteDifferenceSuite.fdm_dissipation_order
Einstein.FiniteDifferenceSuite.fdm_dissipation_weights
Einstein.FiniteDifferenceSuite.fdm_dissipation_width
Einstein.FiniteDifferenceSuite.fdm_extrapolation_weights
Einstein.FiniteDifferenceSuite.fdm_hermite_boundary_weights
Einstein.FiniteDifferenceSuite.fdm_hermite_boundary_width
Einstein.FiniteDifferenceSuite.fdm_hermite_weights
Einstein.FiniteDifferenceSuite.fdm_hermite_width
Einstein.FiniteDifferenceSuite.fdm_integrate_simpson
Einstein.FiniteDifferenceSuite.fdm_operator_matrix
Einstein.FiniteDifferenceSuite.fdm_weights_fornberg
Einstein.QNMSuite.continued_fraction_lentz
Einstein.QNMSuite.qnm_kerr
Einstein.QNMSuite.qnm_kerr_radial
Einstein.QNMSuite.qnm_pep_companion
Einstein.QNMSuite.qnm_schw_expansion_dolan_ottewill
Einstein.Utils.barycentric_differentiation_matrix
Einstein.Utils.barycentric_interpolate
Einstein.Utils.barycentric_weights
Einstein.Utils.dot_kahan
Einstein.Utils.dot_xsum
Einstein.Utils.sum_kahan
Einstein.Utils.sum_xsum
Einstein.Utils.sws_A0
Einstein.Utils.sws_eigM
Einstein.Utils.sws_eigen
Einstein.Utils.sws_l_min