StrahlkorperGrTestHelpers.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <array>
7 #include <cstddef>
8 
10 
11 /// \cond
12 class YlmSpherepack;
13 /// \endcond
14 
15 namespace TestHelpers {
16 namespace Schwarzschild {
17 /*!
18  * \ingroup TestingFrameworkGroup
19  * \brief Schwarzschild (Kerr-Schild) spatial ricci tensor
20  *
21  * \details
22  * Computes \f$R_{ij} = M \frac{r^2(4M+r)\delta_{ij}-(8M+3r)x_i x_j}
23  * {r^4(2M+r^2)},\f$
24  * where \f$r = x_i x_j \delta^{ij}\f$, \f$x_i\f$ is the
25  * position vector in Cartesian coordinates, and M is the mass.
26  */
27 template <size_t SpatialDim, typename Frame, typename DataType>
28 tnsr::ii<DataType, SpatialDim, Frame> spatial_ricci(
29  const tnsr::I<DataType, SpatialDim, Frame>& x, double mass) noexcept;
30 } // namespace Schwarzschild
31 
32 namespace Minkowski {
33 /*!
34  * \ingroup TestingFrameworkGroup
35  * \brief Extrinsic curvature of 2D sphere in 3D flat space
36  *
37  * \details
38  * Computes \f$K_{ij} = \frac{1}{r}\left(\delta_{ij} -
39  * \frac{x_i x_j}{r}\right),\f$
40  * where \f$r = x_i x_j \delta^{ij}\f$ and \f$x_i\f$ is the
41  * position vector in Cartesian coordinates.
42  */
43 template <size_t SpatialDim, typename Frame, typename DataType>
44 tnsr::ii<DataType, SpatialDim, Frame> extrinsic_curvature_sphere(
45  const tnsr::I<DataType, SpatialDim, Frame>& x) noexcept;
46 } // namespace Minkowski
47 
48 namespace Kerr {
49 /*!
50  * \ingroup TestingFrameworkGroup
51  * \brief Kerr (Kerr-Schild) horizon ricci scalar (spin on z axis)
52  *
53  * \details
54  * Computes the 2-dimensional Ricci scalar \f$R\f$ on the
55  * horizon of a Kerr-Schild black hole with spin in the z direction
56  * in terms of mass `mass` and dimensionless spin `dimensionless_spin_z`.
57  */
58 template <typename DataType>
60  double mass,
61  double dimensionless_spin_z) noexcept;
62 
63 /*!
64  * \ingroup TestingFrameworkGroup
65  * \brief Kerr (Kerr-Schild) horizon ricci scalar (generic spin)
66  *
67  * \details
68  * Computes the 2-dimensional Ricci scalar \f$R\f$ on the
69  * horizon of a Kerr-Schild black hole with generic spin
70  * in terms of mass `mass` and dimensionless spin `dimensionless_spin`.
71  */
72 template <typename DataType>
74  const Scalar<DataType>& horizon_radius_with_spin_on_z_axis,
75  const YlmSpherepack& ylm_with_spin_on_z_axis, const YlmSpherepack& ylm,
76  double mass, const std::array<double, 3>& dimensionless_spin) noexcept;
77 
78 } // namespace Kerr
79 } // namespace TestHelpers
YlmSpherepack
C++ interface to SPHEREPACK.
Definition: YlmSpherepack.hpp:21
TestHelpers::Minkowski::extrinsic_curvature_sphere
tnsr::ii< DataType, SpatialDim, Frame > extrinsic_curvature_sphere(const tnsr::I< DataType, SpatialDim, Frame > &x) noexcept
Extrinsic curvature of 2D sphere in 3D flat space.
TestHelpers::Schwarzschild::spatial_ricci
tnsr::ii< DataType, SpatialDim, Frame > spatial_ricci(const tnsr::I< DataType, SpatialDim, Frame > &x, double mass) noexcept
Schwarzschild (Kerr-Schild) spatial ricci tensor.
cstddef
array
Scalar
Tensor< T, Symmetry<>, index_list<> > Scalar
Definition: TypeAliases.hpp:21
TypeAliases.hpp
TestHelpers::Kerr::horizon_ricci_scalar
Scalar< DataType > horizon_ricci_scalar(const Scalar< DataType > &horizon_radius_with_spin_on_z_axis, const YlmSpherepack &ylm_with_spin_on_z_axis, const YlmSpherepack &ylm, double mass, const std::array< double, 3 > &dimensionless_spin) noexcept
Kerr (Kerr-Schild) horizon ricci scalar (generic spin)