Line data Source code
1 0 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : #pragma once 5 : 6 : namespace gr { 7 : 8 : /*! 9 : * \brief Computes the tortoise coordinates radius from the Boyer-Lindquist 10 : * radius. 11 : * 12 : * This function evaluates the transformation from tortoise coordinates $r_*$ to 13 : * Boyer-Lindquist radius $r$: 14 : * \begin{equation} 15 : * r_* = r + \frac{2 M}{r_+ - r_-}\left( 16 : * r_+ \ln(\frac{r - r_+}{2 M}) - r_- \ln(\frac{r - r_-}{2 M}) \right) 17 : * \end{equation} 18 : * where $r_\pm = M \pm \sqrt{M^2 - a^2}$. 19 : * 20 : * \param r_minus_r_plus Boyer-Lindquist radius minus $r_+$: $r - r_+$. 21 : * \param mass Kerr mass parameter $M$. 22 : * \param dimensionless_spin Kerr dimensionless spin parameter $\chi=a/M$. 23 : * \return Tortoise coordinates radius $r_*$. 24 : */ 25 : template <typename DataType> 26 1 : DataType tortoise_radius_from_boyer_lindquist_minus_r_plus( 27 : const DataType& r_minus_r_plus, double mass, double dimensionless_spin); 28 : 29 : /*! 30 : * \brief Computes the Boyer-Lindquist radius from tortoise coordinates. 31 : * 32 : * This function inverts the transformation from tortoise coordinates radius 33 : * $r_*$ to Boyer-Lindquist radius $r$: 34 : * \begin{equation} 35 : * r_* = r + \frac{2 M}{r_+ - r_-}\left( 36 : * r_+ \ln(\frac{r - r_+}{2 M}) - r_- \ln(\frac{r - r_-}{2 M}) \right) 37 : * \end{equation} 38 : * where $r_\pm = M \pm \sqrt{M^2 - a^2}$. 39 : * 40 : * It performs a numerical rootfind to invert the above equation. 41 : * 42 : * \param r_star Tortoise coordinate $r_*$. 43 : * \param mass Kerr mass parameter $M$. 44 : * \param dimensionless_spin Kerr dimensionless spin parameter $\chi=a/M$. 45 : * \return Boyer-Lindquist radius minus $r_+$: $r - r_+$. 46 : */ 47 : template <typename DataType> 48 1 : DataType boyer_lindquist_radius_minus_r_plus_from_tortoise( 49 : const DataType& r_star, double mass, double dimensionless_spin); 50 : 51 : } // namespace gr