SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/Cce/AnalyticSolutions - LinearizedBondiSachs.hpp Hit Total Coverage
Commit: a18e59fda1a195609825c55450f7d61ad20a91a4 Lines: 16 43 37.2 %
Date: 2026-06-11 22:10:41
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 <complex>
       7             : #include <cstddef>
       8             : #include <limits>
       9             : #include <memory>
      10             : #include <vector>
      11             : 
      12             : #include "DataStructures/SpinWeighted.hpp"
      13             : #include "Evolution/Systems/Cce/AnalyticSolutions/LinearizedBondiSachsInitializeJ.hpp"
      14             : #include "Evolution/Systems/Cce/AnalyticSolutions/SphericalMetricData.hpp"
      15             : #include "Evolution/Systems/Cce/AnalyticSolutions/WorldtubeData.hpp"
      16             : #include "Evolution/Systems/Cce/Initialize/InitializeJ.hpp"
      17             : #include "Evolution/Systems/Cce/Tags.hpp"
      18             : #include "Options/StdComplex.hpp"
      19             : #include "Options/String.hpp"
      20             : #include "Utilities/Gsl.hpp"
      21             : #include "Utilities/Serialization/CharmPupable.hpp"
      22             : #include "Utilities/TMPL.hpp"
      23             : 
      24             : /// \cond
      25             : class DataVector;
      26             : class ComplexDataVector;
      27             : /// \endcond
      28             : 
      29             : namespace Cce::Solutions {
      30             : namespace LinearizedBondiSachs_detail {
      31             : 
      32             : // combine the (2,2) and (3,3) modes to collocation values for
      33             : // `bondi_quantity`
      34             : template <int Spin, typename FactorType>
      35             : void assign_components_from_l_factors(
      36             :     gsl::not_null<SpinWeighted<ComplexDataVector, Spin>*> bondi_quantity,
      37             :     const FactorType& l_2_factor, const FactorType& l_3_factor, size_t l_max,
      38             :     double frequency, double time);
      39             : 
      40             : // combine the (2,2) and (3,3) modes to time derivative collocation values for
      41             : // `bondi_quantity`
      42             : template <int Spin>
      43             : void assign_du_components_from_l_factors(
      44             :     gsl::not_null<SpinWeighted<ComplexDataVector, Spin>*> du_bondi_quantity,
      45             :     const std::complex<double>& l_2_factor,
      46             :     const std::complex<double>& l_3_factor, size_t l_max, double frequency,
      47             :     double time);
      48             : }  // namespace LinearizedBondiSachs_detail
      49             : 
      50             : /*!
      51             :  * \brief Computes the analytic data for a Linearized solution to the
      52             :  * Bondi-Sachs equations described in \cite Barkett2019uae.
      53             :  *
      54             :  * \details The solution represented by this function is generated with only
      55             :  * \f$(2,\pm2)\f$ and \f$(3,\pm3)\f$ modes, and is constructed according to the
      56             :  * linearized solution documented in Section VI of \cite Barkett2019uae. For
      57             :  * this solution, we impose additional restrictions that the linearized solution
      58             :  * be asymptotically flat so that it is compatible with the gauge
      59             :  * transformations performed in the SpECTRE regularity-preserving CCE. Using the
      60             :  * notation of \cite Barkett2019uae, we set:
      61             :  *
      62             :  * \f{align*}{
      63             :  * B_2 &= B_3 = 0\\
      64             :  * C_{2b} &= 3 C_{2a} / \nu^2\\
      65             :  * C_{3b} &= -3 i C_{3a} / \nu^3
      66             :  * \f}
      67             :  *
      68             :  * where \f$C_{2a}\f$ and \f$C_{3a}\f$ may be specified freely and are taken via
      69             :  * input option `InitialModes`.
      70             :  */
      71           1 : struct LinearizedBondiSachs : public SphericalMetricData {
      72           0 :   struct InitialModes {
      73           0 :     using type = std::array<std::complex<double>, 2>;
      74           0 :     static constexpr Options::String help{
      75             :         "The initial modes of the Robinson-Trautman scalar"};
      76             :   };
      77           0 :   struct ExtractionRadius {
      78           0 :     using type = double;
      79           0 :     static constexpr Options::String help{
      80             :         "The extraction radius of the spherical solution"};
      81           0 :     static type lower_bound() { return 0.0; }
      82             :   };
      83           0 :   struct Frequency {
      84           0 :     using type = double;
      85           0 :     static constexpr Options::String help{
      86             :         "The frequency of the linearized modes."};
      87           0 :     static type lower_bound() { return 0.0; }
      88             :   };
      89             : 
      90           0 :   static constexpr Options::String help{
      91             :     "A linearized Bondi-Sachs analytic solution"};
      92             : 
      93           0 :   using options = tmpl::list<InitialModes, ExtractionRadius, Frequency>;
      94             : 
      95           0 :   WRAPPED_PUPable_decl_template(LinearizedBondiSachs);  // NOLINT
      96             : 
      97           0 :   explicit LinearizedBondiSachs(CkMigrateMessage* msg)
      98             :       : SphericalMetricData(msg) {}
      99             : 
     100             :   // clang doesn't manage to use = default correctly in this case
     101             :   // NOLINTNEXTLINE(hicpp-use-equals-default,modernize-use-equals-default)
     102           0 :   LinearizedBondiSachs() {}
     103             : 
     104           0 :   LinearizedBondiSachs(
     105             :       const std::array<std::complex<double>, 2>& mode_constants,
     106             :       double extraction_radius, double frequency);
     107             : 
     108           0 :   std::unique_ptr<WorldtubeData> get_clone() const override;
     109             : 
     110           0 :   void pup(PUP::er& p) override;
     111             : 
     112           0 :   std::unique_ptr<Cce::InitializeJ::InitializeJ<false>> get_initialize_j(
     113             :       double start_time) const override;
     114             : 
     115             :  protected:
     116             :   /// A no-op as the linearized solution does not have substantial shared
     117             :   /// computation to prepare before the separate component calculations.
     118           1 :   void prepare_solution(const size_t /*output_l_max*/,
     119             :                         const double /*time*/) const override {}
     120             : 
     121             :   /*!
     122             :    * \brief Computes the linearized solution for \f$J\f$.
     123             :    *
     124             :    * \details The linearized solution for \f$J\f$ is given by
     125             :    * \cite Barkett2019uae,
     126             :    *
     127             :    * \f[
     128             :    * J = \sqrt{12} ({}_2 Y_{2\,2} + {}_2 Y_{2\, -2})
     129             :    *  \mathrm{Re}(J_2(r) e^{i \nu u})
     130             :    * + \sqrt{60} ({}_2 Y_{3\,3} - {}_2 Y_{3\, -3})
     131             :    * \mathrm{Re}(J_3(r) e^{i \nu u}),
     132             :    * \f]
     133             :    *
     134             :    * where
     135             :    *
     136             :    * \f{align*}{
     137             :    * J_2(r) &= \frac{C_{2a}}{4 r} - \frac{C_{2b}}{12 r^3}, \\
     138             :    * J_3(r) &= \frac{C_{3a}}{10 r} - \frac{i \nu C_{3 b}}{6 r^3}
     139             :    * - \frac{C_{3 b}}{4 r^4}.
     140             :    * \f}
     141             :    */
     142           1 :   void linearized_bondi_j(
     143             :       gsl::not_null<SpinWeighted<ComplexDataVector, 2>*> bondi_j, size_t l_max,
     144             :       double time) const;
     145             : 
     146             :   /*!
     147             :    * \brief Compute the linearized solution for \f$U\f$
     148             :    *
     149             :    * \details The linearized solution for \f$U\f$ is given by
     150             :    * \cite Barkett2019uae,
     151             :    *
     152             :    * \f[
     153             :    * U = \sqrt{3} ({}_1 Y_{2\,2} + {}_1 Y_{2\, -2})
     154             :    *  \mathrm{Re}(U_2(r) e^{i \nu u})
     155             :    * + \sqrt{6} ({}_1 Y_{3\,3} - {}_1 Y_{3\, -3})
     156             :    * \mathrm{Re}(U_3(r) e^{i \nu u}),
     157             :    * \f]
     158             :    *
     159             :    * where
     160             :    *
     161             :    * \f{align*}{
     162             :    * U_2(r) &= \frac{C_{2a}}{2 r^2} + \frac{i \nu C_{2 b}}{3 r^3}
     163             :    * + \frac{C_{2b}}{4 r^4} \\
     164             :    * U_3(r) &= \frac{C_{3a}}{2 r^2} - \frac{2 \nu^2 C_{3b}}{3 r^3}
     165             :    * + \frac{5 i \nu C_{3b}}{4 r^4} + \frac{C_{3 b}}{r^5}
     166             :    * \f}
     167             :    */
     168           1 :   void linearized_bondi_u(
     169             :       gsl::not_null<SpinWeighted<ComplexDataVector, 1>*> bondi_u, size_t l_max,
     170             :       double time) const;
     171             : 
     172             :   /*!
     173             :    * \brief Computes the linearized solution for \f$W\f$.
     174             :    *
     175             :    * \details The linearized solution for \f$W\f$ is given by
     176             :    * \cite Barkett2019uae,
     177             :    *
     178             :    * \f[
     179             :    * W = \frac{1}{\sqrt{2}} ({}_0 Y_{2\,2} + {}_0 Y_{2\, -2})
     180             :    *  \mathrm{Re}(W_2(r) e^{i \nu u})
     181             :    * + \frac{1}{\sqrt{2}} ({}_0 Y_{3\,3} - {}_0 Y_{3\, -3})
     182             :    * \mathrm{Re}(W_3(r) e^{i \nu u}),
     183             :    * \f]
     184             :    *
     185             :    * where
     186             :    *
     187             :    * \f{align*}{
     188             :    * W_2(r) &= - \frac{\nu^2 C_{2b}}{r^2} + \frac{i \nu C_{2 b}}{r^3}
     189             :    * + \frac{C_{2b}}{2 r^4}, \\
     190             :    * W_3(r) &= -\frac{2 i \nu^3 C_{3b}}{r^2} - \frac{4 i \nu^2 C_{3b}}{r^3}
     191             :    * + \frac{5 \nu C_{3b}}{2 r^4} + \frac{3 C_{3b}}{r^5}.
     192             :    * \f}
     193             :    */
     194           1 :   void linearized_bondi_w(
     195             :       gsl::not_null<SpinWeighted<ComplexDataVector, 0>*> bondi_w, size_t l_max,
     196             :       double time) const;
     197             : 
     198             :   /*!
     199             :    * \brief Computes the linearized solution for \f$\partial_r J\f$.
     200             :    *
     201             :    * \details The linearized solution for \f$\partial_r J\f$ is given by
     202             :    * \cite Barkett2019uae,
     203             :    *
     204             :    * \f[
     205             :    * \partial_r J = \sqrt{12} ({}_2 Y_{2\,2} + {}_2 Y_{2\, -2})
     206             :    *  \mathrm{Re}(\partial_r J_2(r) e^{i \nu u})
     207             :    * + \sqrt{60} ({}_2 Y_{3\,3} - {}_2 Y_{3\, -3})
     208             :    * \mathrm{Re}(\partial_r J_3(r) e^{i \nu u}),
     209             :    * \f]
     210             :    *
     211             :    * where
     212             :    *
     213             :    * \f{align*}{
     214             :    * \partial_r J_2(r) &= - \frac{C_{2a}}{4 r^2} + \frac{C_{2b}}{4 r^4}, \\
     215             :    * \partial_r J_3(r) &= -\frac{C_{3a}}{10 r^2} + \frac{i \nu C_{3 b}}{2 r^4}
     216             :    * + \frac{C_{3 b}}{r^5}.
     217             :    * \f}
     218             :    */
     219           1 :   void linearized_dr_bondi_j(
     220             :       gsl::not_null<SpinWeighted<ComplexDataVector, 2>*> dr_bondi_j,
     221             :       size_t l_max, double time) const;
     222             : 
     223             :   /*!
     224             :    * \brief Compute the linearized solution for \f$\partial_r U\f$
     225             :    *
     226             :    * \details The linearized solution for \f$\partial_r U\f$ is given by
     227             :    * \cite Barkett2019uae,
     228             :    *
     229             :    * \f[
     230             :    * \partial_r U = \sqrt{3} ({}_1 Y_{2\,2} + {}_1 Y_{2\, -2})
     231             :    *  \mathrm{Re}(\partial_r U_2(r) e^{i \nu u})
     232             :    * + \sqrt{6} ({}_1 Y_{3\,3} - {}_1 Y_{3\, -3})
     233             :    * \mathrm{Re}(\partial_r U_3(r) e^{i \nu u}),
     234             :    * \f]
     235             :    *
     236             :    * where
     237             :    *
     238             :    * \f{align*}{
     239             :    * \partial_r U_2(r) &= -\frac{C_{2a}}{r^3} - \frac{i \nu C_{2 b}}{r^4}
     240             :    * - \frac{C_{2b}}{r^5} \\
     241             :    * \partial_r U_3(r) &= -\frac{C_{3a}}{r^3} + \frac{2 \nu^2 C_{3b}}{r^4}
     242             :    * - \frac{5 i \nu C_{3b}}{r^5} - \frac{5 C_{3 b}}{r^6}
     243             :    * \f}
     244             :    */
     245           1 :   void linearized_dr_bondi_u(
     246             :       gsl::not_null<SpinWeighted<ComplexDataVector, 1>*> dr_bondi_u,
     247             :       size_t l_max, double time) const;
     248             : 
     249             :   /*!
     250             :    * \brief Computes the linearized solution for \f$\partial_r W\f$.
     251             :    *
     252             :    * \details The linearized solution for \f$W\f$ is given by
     253             :    * \cite Barkett2019uae,
     254             :    *
     255             :    * \f[
     256             :    * \partial_r W = \frac{1}{\sqrt{2}} ({}_0 Y_{2\,2} + {}_0 Y_{2\, -2})
     257             :    *  \mathrm{Re}(\partial_r W_2(r) e^{i \nu u})
     258             :    * + \frac{1}{\sqrt{2}} ({}_0 Y_{3\,3} - {}_0 Y_{3\, -3})
     259             :    * \mathrm{Re}(\partial_r W_3(r) e^{i \nu u}),
     260             :    * \f]
     261             :    *
     262             :    * where
     263             :    *
     264             :    * \f{align*}{
     265             :    * \partial_r W_2(r) &= \frac{2 \nu^2 C_{2b}}{r^3}
     266             :    * - \frac{3 i \nu C_{2 b}}{r^4} - \frac{2 C_{2b}}{r^5}, \\
     267             :    * \partial_r W_3(r) &= \frac{4 i \nu^3 C_{3b}}{r^3}
     268             :    * + \frac{12 i \nu^2  C_{3b}}{r^4} - \frac{10 \nu C_{3b}}{r^5}
     269             :    * - \frac{15 C_{3b}}{r^6}.
     270             :    * \f}
     271             :    */
     272           1 :   void linearized_dr_bondi_w(
     273             :       gsl::not_null<SpinWeighted<ComplexDataVector, 0>*> dr_bondi_w,
     274             :       size_t l_max, double time) const;
     275             : 
     276             :   /*!
     277             :    * \brief Computes the linearized solution for \f$\partial_u J\f$.
     278             :    *
     279             :    * \details The linearized solution for \f$\partial_u J\f$ is given by
     280             :    * \cite Barkett2019uae,
     281             :    *
     282             :    * \f[
     283             :    * \partial_u J = \sqrt{12} ({}_2 Y_{2\,2} + {}_2 Y_{2\, -2})
     284             :    *  \mathrm{Re}(i \nu J_2(r)  e^{i \nu u})
     285             :    * + \sqrt{60} ({}_2 Y_{3\,3} - {}_2 Y_{3\, -3})
     286             :    * \mathrm{Re}(i \nu J_3(r) e^{i \nu u}),
     287             :    * \f]
     288             :    *
     289             :    * where
     290             :    *
     291             :    * \f{align*}{
     292             :    * J_2(r) &= \frac{C_{2a}}{4 r} - \frac{C_{2b}}{12 r^3}, \\
     293             :    * J_3(r) &= \frac{C_{3a}}{10 r} - \frac{i \nu C_{3 b}}{6 r^3}
     294             :    * - \frac{C_{3 b}}{4 r^4}.
     295             :    * \f}
     296             :    */
     297           1 :   void linearized_du_bondi_j(
     298             :       gsl::not_null<SpinWeighted<ComplexDataVector, 2>*> du_bondi_j,
     299             :       size_t l_max, double time) const;
     300             : 
     301             :   /*!
     302             :    * \brief Compute the linearized solution for \f$\partial_u U\f$
     303             :    *
     304             :    * \details The linearized solution for \f$U\f$ is given by
     305             :    * \cite Barkett2019uae,
     306             :    *
     307             :    * \f[
     308             :    * \partial_u U = \sqrt{3} ({}_2 Y_{2\,2} + {}_2 Y_{2\, -2})
     309             :    *  \mathrm{Re}(i \nu U_2(r) e^{i \nu u})
     310             :    * + \sqrt{6} ({}_2 Y_{3\,3} - {}_2 Y_{3\, -3})
     311             :    * \mathrm{Re}(i \nu U_3(r) e^{i \nu u}),
     312             :    * \f]
     313             :    *
     314             :    * where
     315             :    *
     316             :    * \f{align*}{
     317             :    * U_2(r) &= \frac{C_{2a}}{2 r^2} + \frac{i \nu C_{2 b}}{3 r^3}
     318             :    * + \frac{C_{2b}}{4 r^4} \\
     319             :    * U_3(r) &= \frac{C_{3a}}{2 r^2} - \frac{2 \nu^2 C_{3b}}{3 r^3}
     320             :    * + \frac{5 i \nu C_{3b}}{4 r^4} + \frac{C_{3 b}}{r^5}
     321             :    * \f}
     322             :    */
     323           1 :   void linearized_du_bondi_u(
     324             :       gsl::not_null<SpinWeighted<ComplexDataVector, 1>*> du_bondi_u,
     325             :       size_t l_max, double time) const;
     326             : 
     327             :   /*!
     328             :    * \brief Computes the linearized solution for \f$\partial_u W\f$.
     329             :    *
     330             :    * \details The linearized solution for \f$\partial_u W\f$ is given by
     331             :    * \cite Barkett2019uae,
     332             :    *
     333             :    * \f[
     334             :    * \partial_u W = \frac{1}{\sqrt{2}} ({}_1 Y_{2\,2} + {}_1 Y_{2\, -2})
     335             :    *  \mathrm{Re}(i \nu W_2(r) e^{i \nu u})
     336             :    * + \frac{1}{\sqrt{2}} ({}_1 Y_{3\,3} - {}_1 Y_{3\, -3})
     337             :    * \mathrm{Re}(i \nu W_3(r) e^{i \nu u}),
     338             :    * \f]
     339             :    *
     340             :    * where
     341             :    *
     342             :    * \f{align*}{
     343             :    * W_2(r) &= \frac{\nu^2 C_{2b}}{r^2} + \frac{i \nu C_{2 b}}{r^3}
     344             :    * + \frac{C_{2b}}{2 r^4}, \\
     345             :    * W_3(r) &= \frac{2 i \nu^3 C_{3b}}{r^2} - \frac{4 i \nu^2 C_{3b}}{r^3}
     346             :    * + \frac{5 \nu C_{3b}}{2 r^4} + \frac{3 C_{3b}}{r^5}.
     347             :    * \f}
     348             :    */
     349           1 :   void linearized_du_bondi_w(
     350             :       gsl::not_null<SpinWeighted<ComplexDataVector, 0>*> du_bondi_w,
     351             :       size_t l_max, double time) const;
     352             : 
     353             :   /*!
     354             :    * \brief Compute the spherical coordinate metric from the linearized
     355             :    * Bondi-Sachs system.
     356             :    *
     357             :    * \details This function dispatches to the individual computations in this
     358             :    * class to determine the Bondi-Sachs scalars for the linearized solution.
     359             :    * Once the scalars are determined, the metric is assembled via (note
     360             :    * \f$\beta = 0\f$ in this solution)
     361             :    *
     362             :    * \f{align*}{
     363             :    * ds^2 =& - ((1 + r W) - r^2 h_{A B} U^A U^B) (dt - dr)^2
     364             :    * - 2  (dt - dr) dr \\
     365             :    * &- 2 r^2 h_{A B} U^B (dt - dr) dx^A + r^2 h_{A B} dx^A dx^B,
     366             :    * \f}
     367             :    *
     368             :    * where indices with capital letters refer to angular coordinates and the
     369             :    * angular tensors may be written in terms of spin-weighted scalars. Doing so
     370             :    * gives the metric components,
     371             :    *
     372             :    * \f{align*}{
     373             :    * g_{t t} &= -\left(1 + r W
     374             :    * - r^2 \Re\left(\bar J U^2 + K U \bar U\right)\right)\\
     375             :    * g_{t r} &= -1 - g_{t t}\\
     376             :    * g_{r r} &= 2 + g_{t t}\\
     377             :    * g_{t \theta} &= r^2 \Re\left(K U + J \bar U\right)\\
     378             :    * g_{t \phi} &= r^2 \Im\left(K U + J \bar U\right)\\
     379             :    * g_{r \theta} &= -g_{t \theta}\\
     380             :    * g_{r \phi} &= -g_{t \phi}\\
     381             :    * g_{\theta \theta} &= r^2 \Re\left(J + K\right)\\
     382             :    * g_{\theta \phi} &= r^2 \Im\left(J\right)\\
     383             :    * g_{\phi \phi} &= r^2 \Re\left(K - J\right),
     384             :    * \f}
     385             :    *
     386             :    * and all other components are zero.
     387             :    */
     388           1 :   void spherical_metric(
     389             :       gsl::not_null<
     390             :           tnsr::aa<DataVector, 3, ::Frame::Spherical<::Frame::Inertial>>*>
     391             :           spherical_metric,
     392             :       size_t l_max, double time) const override;
     393             : 
     394             :   /*!
     395             :    * \brief Compute the radial derivative of the spherical coordinate metric
     396             :    * from the linearized Bondi-Sachs system.
     397             :    *
     398             :    * \details This function dispatches to the individual computations in this
     399             :    * class to determine the Bondi-Sachs scalars for the linearized solution.
     400             :    * Once the scalars are determined, the radial derivative of the metric is
     401             :    * assembled via (note \f$\beta = 0\f$ in this solution)
     402             :    *
     403             :    * \f{align*}{
     404             :    * \partial_r g_{a b} dx^a dx^b =& - (W + r \partial_r W
     405             :    * - 2 r h_{A B} U^A U^B - r^2 (\partial_r h_{A B}) U^A U^B
     406             :    * - 2 r^2 h_{A B} U^A \partial_r U^B) (dt - dr)^2 \\
     407             :    * &- (4 r h_{A B} U^B + 2 r^2 ((\partial_r h_{A B}) U^B
     408             :    * + h_{AB} \partial_r U^B) ) (dt - dr) dx^A
     409             :    * + (2 r h_{A B} + r^2 \partial_r h_{A B}) dx^A dx^B,
     410             :    * \f}
     411             :    *
     412             :    * where indices with capital letters refer to angular coordinates and the
     413             :    * angular tensors may be written in terms of spin-weighted scalars. Doing so
     414             :    * gives the metric components,
     415             :    *
     416             :    * \f{align*}{
     417             :    * \partial_r g_{t t} &= -\left( W + r \partial_r W
     418             :    *  - 2 r \Re\left(\bar J U^2 + K U \bar U\right)
     419             :    * - r^2 \partial_r \Re\left(\bar J U^2 + K U \bar U\right)\right) \\
     420             :    * \partial_r g_{t r} &= -\partial_r g_{t t}\\
     421             :    * \partial_r g_{t \theta} &= 2 r \Re\left(K U + J \bar U\right)
     422             :    *   + r^2 \partial_r \Re\left(K U + J \bar U\right) \\
     423             :    * \partial_r g_{t \phi} &= 2r \Im\left(K U + J \bar U\right)
     424             :    *   + r^2 \partial_r \Im\left(K U + J \bar U\right) \\
     425             :    * \partial_r g_{r r} &= \partial_r g_{t t}\\
     426             :    * \partial_r g_{r \theta} &= -\partial_r g_{t \theta}\\
     427             :    * \partial_r g_{r \phi} &= -\partial_r g_{t \phi}\\
     428             :    * \partial_r g_{\theta \theta} &= 2 r \Re\left(J + K\right)
     429             :    *   + r^2 \Re\left(\partial_r J + \partial_r K\right) \\
     430             :    * \partial_r g_{\theta \phi} &= 2 r \Im\left(J\right)
     431             :    *  + r^2 \Im\left(\partial_r J\right)\\
     432             :    * \partial_r g_{\phi \phi} &= 2 r \Re\left(K - J\right)
     433             :    *  + r^2 \Re\left(\partial_r K - \partial_r J\right),
     434             :    * \f}
     435             :    *
     436             :    * and all other components are zero.
     437             :    */
     438           1 :   void dr_spherical_metric(
     439             :       gsl::not_null<
     440             :           tnsr::aa<DataVector, 3, ::Frame::Spherical<::Frame::Inertial>>*>
     441             :           dr_spherical_metric,
     442             :       size_t l_max, double time) const override;
     443             : 
     444             :   /*!
     445             :    * \brief Compute the time derivative of the spherical coordinate metric from
     446             :    * the linearized Bondi-Sachs system.
     447             :    *
     448             :    * \details This function dispatches to the individual computations in this
     449             :    * class to determine the Bondi-Sachs scalars for the linearized solution.
     450             :    * Once the scalars are determined, the metric is assembled via (note
     451             :    * \f$\beta = 0\f$ in this solution, and note that we take coordinate
     452             :    * \f$t=u\f$ in converting to the Cartesian coordinates)
     453             :    *
     454             :    * \f{align*}{
     455             :    * \partial_t g_{a b} dx^a dx^b =& - (r \partial_u W
     456             :    * - r^2 \partial_u h_{A B} U^A U^B
     457             :    * - 2 r^2 h_{A B} U^B \partial_u U^A) (dt - dr)^2 \\
     458             :    * &- 2 r^2 (\partial_u h_{A B} U^B + h_{A B} \partial_u U^B) (dt - dr) dx^A
     459             :    * + r^2 \partial_u h_{A B} dx^A dx^B,
     460             :    * \f}
     461             :    *
     462             :    * where indices with capital letters refer to angular coordinates and the
     463             :    * angular tensors may be written in terms of spin-weighted scalars. Doing so
     464             :    * gives the metric components,
     465             :    *
     466             :    * \f{align*}{
     467             :    * \partial_t g_{t t} &= -\left(r \partial_u W
     468             :    * - r^2 \partial_u \Re\left(\bar J U^2 + K U \bar U\right)\right)\\
     469             :    * \partial_t g_{t r} &= -\partial_t g_{t t}\\
     470             :    * \partial_t g_{t \theta} &= r^2 \partial_u \Re\left(K U + J \bar U\right)\\
     471             :    * \partial_t g_{t \phi} &= r^2 \partial_u \Im\left(K U + J \bar U\right)\\
     472             :    * \partial_t g_{r r} &= \partial_t g_{t t}\\
     473             :    * \partial_t g_{r \theta} &= -\partial_t g_{t \theta}\\
     474             :    * \partial_t g_{r \phi} &= -\partial_t g_{t \phi}\\
     475             :    * \partial_t g_{\theta \theta} &= r^2 \Re\left(\partial_u J
     476             :    *  + \partial_u K\right)\\
     477             :    * \partial_t g_{\theta \phi} &= r^2 \Im\left(\partial_u J\right)\\
     478             :    * \partial_t g_{\phi \phi} &= r^2 \Re\left(\partial_u K
     479             :    *  - \partial_u J\right),
     480             :    * \f}
     481             :    *
     482             :    * and all other components are zero.
     483             :    */
     484           1 :   void dt_spherical_metric(
     485             :       gsl::not_null<
     486             :           tnsr::aa<DataVector, 3, ::Frame::Spherical<::Frame::Inertial>>*>
     487             :           dt_spherical_metric,
     488             :       size_t l_max, double time) const override;
     489             : 
     490           0 :   using WorldtubeData::variables_impl;
     491             : 
     492           1 :   using SphericalMetricData::variables_impl;
     493             : 
     494             :   /*!
     495             :    * \brief Determines the News function from the linearized solution
     496             :    * parameters.
     497             :    *
     498             :    * \details The News is determined from the formula given in
     499             :    * \cite Barkett2019uae,
     500             :    *
     501             :    * \f{align*}{
     502             :    * N = \frac{1}{2 \sqrt{3}} ({}_{-2} Y_{2\, 2} + {}_{-2} Y_{2\,-2})
     503             :    * \Re\left(i \nu^3 C_{2 b} e^{i \nu u}\right)
     504             :    * + \frac{1}{\sqrt{15}} ({}_{-2} Y_{3\, 3} - {}_{-2} Y_{3\, -3})
     505             :    * \Re\left(- \nu^4 C_{3 b} e^{i \nu u} \right)
     506             :    * \f}
     507             :    */
     508           1 :   void variables_impl(
     509             :       gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, -2>>*> news,
     510             :       size_t l_max, double time,
     511             :       tmpl::type_<Tags::News> /*meta*/) const override;
     512             : 
     513           0 :   std::complex<double> c_2a_ = std::numeric_limits<double>::signaling_NaN();
     514           0 :   std::complex<double> c_3a_ = std::numeric_limits<double>::signaling_NaN();
     515           0 :   std::complex<double> c_2b_ = std::numeric_limits<double>::signaling_NaN();
     516           0 :   std::complex<double> c_3b_ = std::numeric_limits<double>::signaling_NaN();
     517             : 
     518           0 :   double frequency_ = 0.0;
     519             : };
     520             : }  // namespace Cce::Solutions

Generated by: LCOV version 1.14