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

Generated by: LCOV version 1.14