SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/Cce - ScriPlusValues.hpp Hit Total Coverage
Commit: 817e13c5144619b701c7cd870655d8dbf94ab8ce Lines: 13 56 23.2 %
Date: 2024-07-19 22:17:05
Legend: Lines: hit not hit

          Line data    Source code
       1           0 : // Distributed under the MIT License.
       2             : // See LICENSE.txt for details.
       3             : 
       4             : #pragma once
       5             : 
       6             : #include <cstddef>
       7             : 
       8             : #include "DataStructures/DataBox/Prefixes.hpp"
       9             : #include "Evolution/Systems/Cce/OptionTags.hpp"
      10             : #include "Evolution/Systems/Cce/Tags.hpp"
      11             : 
      12             : namespace Cce {
      13             : 
      14             : /// The tags that are needed to be interpolated at scri+ for the available
      15             : /// observation tags.
      16           1 : using scri_plus_interpolation_set =
      17             :     tmpl::list<Tags::News, Tags::ScriPlus<Tags::Strain>,
      18             :                Tags::ScriPlus<Tags::Psi3>, Tags::ScriPlus<Tags::Psi2>,
      19             :                Tags::ScriPlus<Tags::Psi1>, Tags::ScriPlus<Tags::Psi0>,
      20             :                Tags::Du<Tags::TimeIntegral<Tags::ScriPlus<Tags::Psi4>>>,
      21             :                Tags::EthInertialRetardedTime>;
      22             : 
      23             : template <typename Tag>
      24           0 : struct CalculateScriPlusValue;
      25             : 
      26             : /*!
      27             :  * \brief Compute the Bondi news from the evolution quantities.
      28             :  *
      29             :  * \details In the gauge used for regularity-preserving CCE,
      30             :  * the Bondi news takes the convenient form
      31             :  *
      32             :  * \f{align*}{
      33             :  * N = e^{-2 \beta^{(0)}} \left( (\partial_u \bar J)^{(1)}
      34             :  * + \bar \eth \bar \eth e^{2 \beta^{(0)}}\right),
      35             :  * \f}
      36             :  *
      37             :  * where \f$(0)\f$ and \f$(1)\f$ in the superscripts denote the zeroth and first
      38             :  * order in an expansion in \f$1/r\f$ near \f$\mathcal{I}^+\f$.
      39             :  */
      40             : template <>
      41           1 : struct CalculateScriPlusValue<Tags::News> {
      42           0 :   using return_tags = tmpl::list<Tags::News>;
      43             :   // extra typelist for more convenient testing
      44           0 :   using tensor_argument_tags =
      45             :       tmpl::list<Tags::Dy<Tags::Du<Tags::BondiJ>>, Tags::BondiBeta,
      46             :                  Spectral::Swsh::Tags::Derivative<Tags::BondiBeta,
      47             :                                                   Spectral::Swsh::Tags::Eth>,
      48             :                  Spectral::Swsh::Tags::Derivative<Tags::BondiBeta,
      49             :                                                   Spectral::Swsh::Tags::EthEth>,
      50             :                  Tags::EvolutionGaugeBoundaryValue<Tags::BondiR>>;
      51           0 :   using argument_tags =
      52             :       tmpl::append<tensor_argument_tags,
      53             :                    tmpl::list<Tags::LMax, Tags::NumberOfRadialPoints>>;
      54             : 
      55           0 :   static void apply(
      56             :       gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, -2>>*> news,
      57             :       const Scalar<SpinWeighted<ComplexDataVector, 2>>& dy_du_bondi_j,
      58             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& beta,
      59             :       const Scalar<SpinWeighted<ComplexDataVector, 1>>& eth_beta,
      60             :       const Scalar<SpinWeighted<ComplexDataVector, 2>>& eth_eth_beta,
      61             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& boundary_r,
      62             :       size_t l_max, size_t number_of_radial_points);
      63             : };
      64             : 
      65             : /*!
      66             :  * \brief Compute the contribution to the leading \f$\Psi_4\f$ that corresponds
      67             :  * to a total time derivative.
      68             :  *
      69             :  * \details The value \f$\Psi_4\f$ scales asymptotically as \f$r^{-1}\f$, and
      70             :  * has the form
      71             :  *
      72             :  * \f{align*}{
      73             :  * \Psi_4^{(1)} = \partial_{u_{\text{inertial}}} B,
      74             :  * \f}
      75             :  *
      76             :  * where superscripts denote orders in the expansion in powers of \f$r^{-1}\f$.
      77             :  * This mutator computes \f$B\f$:
      78             :  *
      79             :  * \f{align*}{
      80             :  * B = 2 e^{-2 \beta^{(0)}} (\bar \eth \bar U^{(1)} + \partial_u \bar J^{(1)})
      81             :  * \f}
      82             :  *
      83             :  * and the time derivative that appears the original equation obeys,
      84             :  *
      85             :  * \f[
      86             :  * \partial_{u_{\text{inertial}}} = e^{-2 \beta} \partial_u
      87             :  * \f]
      88             :  */
      89             : template <>
      90           1 : struct CalculateScriPlusValue<Tags::TimeIntegral<Tags::ScriPlus<Tags::Psi4>>> {
      91           0 :   using return_tags =
      92             :       tmpl::list<Tags::TimeIntegral<Tags::ScriPlus<Tags::Psi4>>>;
      93             :   // extra typelist for more convenient testing
      94           0 :   using tensor_argument_tags =
      95             :       tmpl::list<Tags::Exp2Beta, Tags::Dy<Tags::BondiU>,
      96             :                  Spectral::Swsh::Tags::Derivative<Tags::Dy<Tags::BondiU>,
      97             :                                                   Spectral::Swsh::Tags::Eth>,
      98             :                  Tags::Dy<Tags::Du<Tags::BondiJ>>,
      99             :                  Tags::EvolutionGaugeBoundaryValue<Tags::BondiR>,
     100             :                  Tags::EthRDividedByR>;
     101           0 :   using argument_tags =
     102             :       tmpl::append<tensor_argument_tags,
     103             :                    tmpl::list<Tags::LMax, Tags::NumberOfRadialPoints>>;
     104             : 
     105           0 :   static void apply(
     106             :       gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, -2>>*>
     107             :           integral_of_psi_4,
     108             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& exp_2_beta,
     109             :       const Scalar<SpinWeighted<ComplexDataVector, 1>>& dy_bondi_u,
     110             :       const Scalar<SpinWeighted<ComplexDataVector, 2>>& eth_dy_bondi_u,
     111             :       const Scalar<SpinWeighted<ComplexDataVector, 2>>& dy_du_bondi_j,
     112             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& boundary_r,
     113             :       const Scalar<SpinWeighted<ComplexDataVector, 1>>& eth_r_divided_by_r,
     114             :       size_t l_max, size_t number_of_radial_points);
     115             : };
     116             : 
     117             : 
     118             : /*!
     119             :  * \brief Computes the leading part of \f$\Psi_3\f$ near \f$\mathcal I^+\f$.
     120             :  *
     121             :  * \details The value \f$\Psi_3\f$ scales asymptotically as \f$r^{-2}\f$, and
     122             :  * has the form (in the coordinates used for regularity preserving CCE)
     123             :  *
     124             :  * \f{align*}{
     125             :  * \Psi_3^{(2)} = 2 \bar \eth \beta^{(0)}
     126             :  * + 4 \bar \eth \beta^{(0)} \eth \bar \eth \beta^{(0)}
     127             :  * + \bar \eth  \eth \bar \eth \beta^{(0)}
     128             :  * + \frac{e^{-2  \beta^{(0)}}}{2}  \eth \partial_u \bar J^{(1)}
     129             :  * - e^{-2  \beta^{(0)}}  \eth  \beta^{(0)}  \partial_u \bar J^{(1)}
     130             :  * \f},
     131             :  *
     132             :  * where \f$J^{(n)}\f$ is the \f$1/r^n\f$ part of \f$J\f$ evaluated at
     133             :  * \f$\mathcal I^+\f$, so
     134             :  *
     135             :  * \f{align*}{
     136             :  * J^{(1)} = (-2 R \partial_y J)|_{y = 1},
     137             :  * \f}
     138             :  *
     139             :  * where the expansion is determined by the conversion between Bondi and
     140             :  * numerical radii \f$r = 2 R / (1 - y)\f$.
     141             :  */
     142             : template <>
     143           1 : struct CalculateScriPlusValue<Tags::ScriPlus<Tags::Psi3>> {
     144           0 :   using return_tags = tmpl::list<Tags::ScriPlus<Tags::Psi3>>;
     145             :   // extra typelist for more convenient testing
     146           0 :   using tensor_argument_tags = tmpl::list<
     147             :       Tags::Exp2Beta,
     148             :       Spectral::Swsh::Tags::Derivative<Tags::BondiBeta,
     149             :                                        Spectral::Swsh::Tags::Eth>,
     150             :       Spectral::Swsh::Tags::Derivative<Tags::BondiBeta,
     151             :                                        Spectral::Swsh::Tags::EthEthbar>,
     152             :       Spectral::Swsh::Tags::Derivative<
     153             :           Spectral::Swsh::Tags::Derivative<Tags::BondiBeta,
     154             :                                            Spectral::Swsh::Tags::EthEthbar>,
     155             :           Spectral::Swsh::Tags::Ethbar>,
     156             :       Tags::Dy<Tags::Du<Tags::BondiJ>>,
     157             :       Spectral::Swsh::Tags::Derivative<Tags::Dy<Tags::Du<Tags::BondiJ>>,
     158             :                                        Spectral::Swsh::Tags::Ethbar>,
     159             :       Tags::EvolutionGaugeBoundaryValue<Tags::BondiR>, Tags::EthRDividedByR>;
     160           0 :   using argument_tags = tmpl::push_back<tensor_argument_tags, Tags::LMax,
     161             :                                         Tags::NumberOfRadialPoints>;
     162             : 
     163           0 :   static void apply(
     164             :       gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, -1>>*> psi_3,
     165             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& exp_2_beta,
     166             :       const Scalar<SpinWeighted<ComplexDataVector, 1>>& eth_beta,
     167             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& eth_ethbar_beta,
     168             :       const Scalar<SpinWeighted<ComplexDataVector, -1>>& ethbar_eth_ethbar_beta,
     169             :       const Scalar<SpinWeighted<ComplexDataVector, 2>>& dy_du_bondi_j,
     170             :       const Scalar<SpinWeighted<ComplexDataVector, 1>>& ethbar_dy_du_bondi_j,
     171             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& boundary_r,
     172             :       const Scalar<SpinWeighted<ComplexDataVector, 1>>& eth_r_divided_by_r,
     173             :       size_t l_max, size_t number_of_radial_points);
     174             : };
     175             : 
     176             : /*!
     177             :  * \brief Computes the leading part of \f$\Psi_2\f$ near \f$\mathcal I^+\f$.
     178             :  *
     179             :  * \details The value \f$\Psi_2\f$ scales asymptotically as \f$r^{-3}\f$, and
     180             :  * has the form (in the coordinates used for regularity preserving CCE)
     181             :  *
     182             :  * \f{align*}{
     183             :  * \Psi_2^{(3)} = -\frac{e^{-2  \beta^{(0)}}}{4}
     184             :  * \left(e^{2 \beta^{(0)}} \eth \bar Q^{(1)} +  \eth \bar U^{(2)}
     185             :  * + \bar \eth  U^{(2)} + J^{(1)} \bar \eth \bar U^{(1)}
     186             :  * +  J^{(1)} \bar \partial_u J^{(1)} - 2 W^{(2)}\right)
     187             :  * \f},
     188             :  *
     189             :  * where \f$A^{(n)}\f$ is the \f$1/r^n\f$ part of \f$A\f$ evaluated at
     190             :  * \f$\mathcal I^+\f$, so for any quantity \f$A\f$,
     191             :  *
     192             :  * \f{align*}{
     193             :  * \eth  A^{(1)} &= (-2 R \eth  \partial_y  A
     194             :  * - 2 \eth R \partial_y  A)|_{y = 1} \notag\\
     195             :  * \eth  A^{(2)} &= (2 R^2 \eth \partial_y^2 A
     196             :  * + 2 R \eth R \partial^2_y  A)|_{y = 1}, \notag\\
     197             :  * A^{(1)} &= (- 2 R \partial_y A)|_{y = 1}, \notag\\
     198             :  * A^{(2)} &= (2 R^2 \partial_y^2 A)|_{y = 1},
     199             :  * \f}
     200             :  *
     201             :  * where the expansion is determined by the conversion between Bondi and
     202             :  * numerical radii \f$r = 2 R / (1 - y)\f$.
     203             :  */
     204             : template <>
     205           1 : struct CalculateScriPlusValue<Tags::ScriPlus<Tags::Psi2>> {
     206           0 :   using return_tags = tmpl::list<Tags::ScriPlus<Tags::Psi2>>;
     207             :   // extra typelist for more convenient testing
     208           0 :   using tensor_argument_tags = tmpl::list<
     209             :       Tags::Exp2Beta, Tags::Dy<Tags::BondiQ>,
     210             :       Spectral::Swsh::Tags::Derivative<Tags::Dy<Tags::BondiQ>,
     211             :                                        Spectral::Swsh::Tags::Ethbar>,
     212             :       Tags::Dy<Tags::BondiU>,
     213             :       Spectral::Swsh::Tags::Derivative<Tags::Dy<Tags::BondiU>,
     214             :                                        Spectral::Swsh::Tags::Eth>,
     215             :       Tags::Dy<Tags::Dy<Tags::BondiU>>,
     216             :       Spectral::Swsh::Tags::Derivative<Tags::Dy<Tags::Dy<Tags::BondiU>>,
     217             :                                        Spectral::Swsh::Tags::Ethbar>,
     218             :       Tags::Dy<Tags::Dy<Tags::BondiW>>, Tags::Dy<Tags::BondiJ>,
     219             :       Tags::Dy<Tags::Du<Tags::BondiJ>>,
     220             :       Tags::EvolutionGaugeBoundaryValue<Tags::BondiR>, Tags::EthRDividedByR>;
     221           0 :   using argument_tags = tmpl::push_back<tensor_argument_tags, Tags::LMax,
     222             :                                         Tags::NumberOfRadialPoints>;
     223             : 
     224           0 :   static void apply(
     225             :       gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 0>>*> psi_2,
     226             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& exp_2_beta,
     227             :       const Scalar<SpinWeighted<ComplexDataVector, 1>>& dy_bondi_q,
     228             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& ethbar_dy_bondi_q,
     229             :       const Scalar<SpinWeighted<ComplexDataVector, 1>>& dy_bondi_u,
     230             :       const Scalar<SpinWeighted<ComplexDataVector, 2>>& eth_dy_bondi_u,
     231             :       const Scalar<SpinWeighted<ComplexDataVector, 1>>& dy_dy_bondi_u,
     232             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& ethbar_dy_dy_bondi_u,
     233             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& dy_dy_bondi_w,
     234             :       const Scalar<SpinWeighted<ComplexDataVector, 2>>& dy_bondi_j,
     235             :       const Scalar<SpinWeighted<ComplexDataVector, 2>>& dy_du_bondi_j,
     236             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& boundary_r,
     237             :       const Scalar<SpinWeighted<ComplexDataVector, 1>>& eth_r_divided_by_r,
     238             :       size_t l_max, size_t number_of_radial_points);
     239             : };
     240             : 
     241             : /*!
     242             :  * \brief Computes the leading part of \f$\Psi_1\f$ near \f$\mathcal I^+\f$.
     243             :  *
     244             :  * \details The value \f$\Psi_1\f$ scales asymptotically as \f$r^{-4}\f$, and
     245             :  * has the form (in the coordinates used for regularity preserving CCE)
     246             :  *
     247             :  * \f{align*}{
     248             :  * \Psi_1^{(4)} = \frac{1}{8} \left(- 12 \eth \beta^{(2)} + J^{(1)} \bar Q^{(1)}
     249             :  * + 2 Q^{(2)}\right)
     250             :  * \f}
     251             :  *
     252             :  * where \f$A^{(n)}\f$ is the \f$1/r^n\f$ part of \f$A\f$ evaluated at
     253             :  * \f$\mathcal I^+\f$, so for any quantity \f$A\f$,
     254             :  *
     255             :  * \f{align*}{
     256             :  * \eth A^{(2)} &= (2 R^2 \eth \partial_y^2 A
     257             :  * + 2 R \eth R \partial^2_y  A)|_{y = 1}, \notag\\
     258             :  * A^{(1)} &= (- 2 R \partial_y A)|_{y = 1}, \notag\\
     259             :  * A^{(2)} &= (2 R^2 \partial_y^2 A)|_{y = 1},
     260             :  * \f}
     261             :  *
     262             :  * where the expansion is determined by the conversion between Bondi and
     263             :  * numerical radii \f$r = 2 R / (1 - y)\f$.
     264             :  */
     265             : template <>
     266           1 : struct CalculateScriPlusValue<Tags::ScriPlus<Tags::Psi1>> {
     267           0 :   using return_tags = tmpl::list<Tags::ScriPlus<Tags::Psi1>>;
     268             :   // extra typelist for more convenient testing
     269           0 :   using tensor_argument_tags = tmpl::list<
     270             :       Tags::Dy<Tags::Dy<Tags::BondiBeta>>,
     271             :       Spectral::Swsh::Tags::Derivative<Tags::Dy<Tags::Dy<Tags::BondiBeta>>,
     272             :                                        Spectral::Swsh::Tags::Eth>,
     273             :       Tags::Dy<Tags::BondiJ>, Tags::Dy<Tags::BondiQ>,
     274             :       Tags::Dy<Tags::Dy<Tags::BondiQ>>,
     275             :       Tags::EvolutionGaugeBoundaryValue<Tags::BondiR>, Tags::EthRDividedByR>;
     276           0 :   using argument_tags = tmpl::push_back<tensor_argument_tags, Tags::LMax,
     277             :                                         Tags::NumberOfRadialPoints>;
     278             : 
     279           0 :   static void apply(
     280             :       gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 1>>*> psi_1,
     281             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& dy_dy_bondi_beta,
     282             :       const Scalar<SpinWeighted<ComplexDataVector, 1>>& eth_dy_dy_bondi_beta,
     283             :       const Scalar<SpinWeighted<ComplexDataVector, 2>>& dy_bondi_j,
     284             :       const Scalar<SpinWeighted<ComplexDataVector, 1>>& dy_bondi_q,
     285             :       const Scalar<SpinWeighted<ComplexDataVector, 1>>& dy_dy_bondi_q,
     286             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& boundary_r,
     287             :       const Scalar<SpinWeighted<ComplexDataVector, 1>>& eth_r_divided_by_r,
     288             :       size_t l_max, size_t number_of_radial_points);
     289             : };
     290             : 
     291             : /*!
     292             :  * \brief Computes the leading part of \f$\Psi_0\f$ near \f$\mathcal I^+\f$.
     293             :  *
     294             :  * \details The value \f$\Psi_0\f$ scales asymptotically as \f$r^{-5}\f$, and
     295             :  * has the form (in the coordinates used for regularity preserving CCE)
     296             :  *
     297             :  * \f{align*}{
     298             :  * \Psi_0^{(5)} = \frac{3}{2}\left(\frac{1}{4}\bar J^{(1)} J^{(1)} {}^2
     299             :  * - J^{(3)}\right)
     300             :  * \f}
     301             :  *
     302             :  * where \f$A^{(n)}\f$ is the \f$1/r^n\f$ part of \f$A\f$ evaluated at
     303             :  * \f$\mathcal I^+\f$, so for any quantity \f$A\f$,
     304             :  *
     305             :  * \f{align*}{
     306             :  * A^{(1)} &= (- 2 R \partial_y A)|_{y = 1} \notag\\
     307             :  * A^{(3)} &= \left(-\frac{4}{3} R^3 \partial_y^3 A\right)|_{y = 1},
     308             :  * \f}
     309             :  *
     310             :  * where the expansion is determined by the conversion between Bondi and
     311             :  * numerical radii \f$r = 2 R / (1 - y)\f$.
     312             :  */
     313             : template <>
     314           1 : struct CalculateScriPlusValue<Tags::ScriPlus<Tags::Psi0>> {
     315           0 :   using return_tags = tmpl::list<Tags::ScriPlus<Tags::Psi0>>;
     316             :   // extra typelist for more convenient testing
     317           0 :   using tensor_argument_tags =
     318             :       tmpl::list<Tags::Dy<Tags::BondiJ>,
     319             :                  Tags::Dy<Tags::Dy<Tags::Dy<Tags::BondiJ>>>,
     320             :                  Tags::EvolutionGaugeBoundaryValue<Tags::BondiR>>;
     321           0 :   using argument_tags = tmpl::push_back<tensor_argument_tags, Tags::LMax,
     322             :                                         Tags::NumberOfRadialPoints>;
     323             : 
     324           0 :   static void apply(
     325             :       gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 2>>*> psi_0,
     326             :       const Scalar<SpinWeighted<ComplexDataVector, 2>>& dy_bondi_j,
     327             :       const Scalar<SpinWeighted<ComplexDataVector, 2>>& dy_dy_dy_bondi_j,
     328             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& boundary_r,
     329             :       size_t l_max, size_t number_of_radial_points);
     330             : };
     331             : 
     332             : /*!
     333             :  * \brief Computes the leading part of the strain \f$h\f$ near \f$\mathcal
     334             :  * I^+\f$.
     335             :  *
     336             :  * \details The value \f$h\f$ scales asymptotically as \f$r^{-1}\f$, and
     337             :  * has the form (in the coordinates used for regularity preserving CCE)
     338             :  *
     339             :  * \f{align*}{
     340             :  * h = \bar J^{(1)} + \bar \eth \bar \eth u^{(0)},
     341             :  * \f}
     342             :  *
     343             :  * where \f$u^{(0)}\f$ is the asymptotically inertial retarded time, and
     344             :  * \f$A^{(n)}\f$ is the \f$1/r^n\f$ part of \f$A\f$ evaluated at
     345             :  * \f$\mathcal I^+\f$, so for any quantity \f$A\f$,
     346             :  *
     347             :  * \f{align*}{
     348             :  * A^{(1)} = (- 2 R \partial_y A)|_{y = 1},
     349             :  * \f}
     350             :  *
     351             :  * where the expansion is determined by the conversion between Bondi and
     352             :  * numerical radii \f$r = 2 R / (1 - y)\f$.
     353             :  */
     354             : template <>
     355           1 : struct CalculateScriPlusValue<Tags::ScriPlus<Tags::Strain>> {
     356           0 :   using return_tags = tmpl::list<Tags::ScriPlus<Tags::Strain>>;
     357             :   // extra typelist for more convenient testing
     358           0 :   using tensor_argument_tags = tmpl::list<
     359             :       Tags::Dy<Tags::BondiJ>,
     360             :       Spectral::Swsh::Tags::Derivative<Tags::ComplexInertialRetardedTime,
     361             :                                        Spectral::Swsh::Tags::EthEth>,
     362             :       Tags::EvolutionGaugeBoundaryValue<Tags::BondiR>>;
     363           0 :   using argument_tags = tmpl::push_back<tensor_argument_tags, Tags::LMax,
     364             :                                         Tags::NumberOfRadialPoints>;
     365             : 
     366           0 :   static void apply(
     367             :       gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, -2>>*> strain,
     368             :       const Scalar<SpinWeighted<ComplexDataVector, 2>>& dy_bondi_j,
     369             :       const Scalar<SpinWeighted<ComplexDataVector, 2>>& eth_eth_retarded_time,
     370             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& boundary_r,
     371             :       size_t l_max, size_t number_of_radial_points);
     372             : };
     373             : 
     374             : /*!
     375             :  * \brief Assign the time derivative of the asymptotically inertial time
     376             :  * coordinate.
     377             :  *
     378             :  * \details The asymptotically inertial time coordinate \f$\mathring u\f$ obeys
     379             :  * the differential equation:
     380             :  *
     381             :  * \f{align*}{
     382             :  * \partial_u \mathring u = e^{2 \beta}.
     383             :  * \f}
     384             :  */
     385             : template <>
     386           1 : struct CalculateScriPlusValue<::Tags::dt<Tags::InertialRetardedTime>> {
     387           0 :   using return_tags = tmpl::list<::Tags::dt<Tags::InertialRetardedTime>>;
     388           0 :   using argument_tags = tmpl::list<Tags::Exp2Beta>;
     389             : 
     390           0 :   static void apply(
     391             :       gsl::not_null<Scalar<DataVector>*> dt_inertial_time,
     392             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& exp_2_beta);
     393             : };
     394             : 
     395             : /// Determines the angular derivative of the asymptotic inertial time, useful
     396             : /// for asymptotic coordinate transformations.
     397             : template <>
     398           1 : struct CalculateScriPlusValue<Tags::EthInertialRetardedTime> {
     399           0 :   using return_tags = tmpl::list<Tags::EthInertialRetardedTime>;
     400           0 :   using argument_tags =
     401             :       tmpl::list<Tags::ComplexInertialRetardedTime, Tags::LMax>;
     402             : 
     403           0 :   static void apply(
     404             :       gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 1>>*>
     405             :           eth_inertial_time,
     406             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& inertial_time,
     407             :       size_t l_max);
     408             : };
     409             : 
     410             : /*!
     411             :  * \brief Computes the leading part of the scalar field \f$\psi\f$ near
     412             :  * \f$\mathcal I^+\f$.
     413             :  *
     414             :  * \details The value \f$\psi\f$ scales asymptotically as \f$r^{-1}\f$. Assuming
     415             :  * \f$\psi^{(n)}\f$ is the \f$1/r^n\f$ part of \f$\psi\f$ evaluated at
     416             :  * \f$\mathcal I^+\f$, so for any \f$\psi\f$,
     417             :  *
     418             :  * \f{align*}{
     419             :  * \psi^{(1)} = (- 2 R \partial_y \psi)|_{y = 1},
     420             :  * \f}
     421             :  *
     422             :  * where the expansion is determined by the conversion between Bondi and
     423             :  * numerical radii \f$r = 2 R / (1 - y)\f$.
     424             :  */
     425             : template <>
     426           1 : struct CalculateScriPlusValue<Tags::ScriPlus<Tags::KleinGordonPsi>> {
     427           0 :   using return_tags = tmpl::list<Tags::ScriPlus<Tags::KleinGordonPsi>>;
     428           0 :   using tensor_argument_tags =
     429             :       tmpl::list<Tags::Dy<Tags::KleinGordonPsi>,
     430             :                  Tags::EvolutionGaugeBoundaryValue<Tags::BondiR>>;
     431           0 :   using argument_tags = tmpl::push_back<tensor_argument_tags, Tags::LMax,
     432             :                                         Tags::NumberOfRadialPoints>;
     433             : 
     434           0 :   static void apply(
     435             :       gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 0>>*> kg_psi_scri,
     436             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& dy_kg_psi,
     437             :       const Scalar<SpinWeighted<ComplexDataVector, 0>>& boundary_r,
     438             :       size_t l_max, size_t number_of_radial_points);
     439             : };
     440             : 
     441             : /// Initialize the \f$\mathcal I^+\f$ value `Tag` for the first hypersurface.
     442             : template <typename Tag>
     443           1 : struct InitializeScriPlusValue;
     444             : 
     445             : /// Initialize the inertial retarded time to the value provided in the mutator
     446             : /// arguments.
     447             : template <>
     448           1 : struct InitializeScriPlusValue<Tags::InertialRetardedTime> {
     449           0 :   using argument_tags = tmpl::list<>;
     450           0 :   using return_tags = tmpl::list<Tags::InertialRetardedTime>;
     451             : 
     452           0 :   static void apply(const gsl::not_null<Scalar<DataVector>*> inertial_time,
     453             :                     const double initial_time = 0.0) {
     454             :     // this is arbitrary, and has to do with choosing a BMS frame.
     455             :     get(*inertial_time) = initial_time;
     456             :   }
     457             : };
     458             : }  // namespace Cce

Generated by: LCOV version 1.14