RotatingSchwarzschild.hpp
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/Tags.hpp"
16 #include "Options/Options.hpp"
18 #include "Utilities/Gsl.hpp"
19 #include "Utilities/Literals.hpp"
20 #include "Utilities/TMPL.hpp"
21
22 /// \cond
23 class DataVector;
24 class ComplexDataVector;
25 /// \endcond
26
27 namespace Cce::Solutions {
28
29 /*!
30  * \brief Computes the analytic data for the rotating Schwarzschild solution
31  * described in \cite Barkett2019uae, section VI.C.
32  *
33  * \details This is a comparatively simple test which simply determines the
34  * Schwarzschild metric in transformed coordinates given by \f$\phi\rightarrow 35 * \phi + \omega u\f$, where \f$u\f$ is the retarded time.
36  */
39  using type = double;
40  static constexpr Options::String help{
41  "The extraction radius of the spherical solution"};
42  static type lower_bound() noexcept { return 0.0; }
43  };
44  struct Mass {
45  using type = double;
46  static constexpr Options::String help{
47  "The mass of the Schwarzschild black hole"};
48  static type lower_bound() noexcept { return 0.0; }
49  };
50  struct Frequency {
51  using type = double;
52  static constexpr Options::String help{
53  "The frequency of the coordinate rotation."};
54  static type lower_bound() noexcept { return 0.0; }
55  };
56
57  using options = tmpl::list<ExtractionRadius, Mass, Frequency>;
58
59  static constexpr Options::String help = {
60  "Analytic solution representing a Schwarzschild black hole in a rotating "
61  "frame"};
62
63  WRAPPED_PUPable_decl_template(RotatingSchwarzschild); // NOLINT
64
65  explicit RotatingSchwarzschild(CkMigrateMessage* msg) noexcept
66  : SphericalMetricData(msg) {}
67
68  // clang doesn't manage to use = default correctly in this case
69  // NOLINTNEXTLINE(modernize-use-equals-default)
70  RotatingSchwarzschild() noexcept {};
71
73  double frequency) noexcept;
74
75  std::unique_ptr<WorldtubeData> get_clone() const noexcept override;
76
77  void pup(PUP::er& p) noexcept override;
78
79  protected:
80  /// A no-op as the rotating Schwarzschild solution does not have substantial
81  /// shared computation to prepare before the separate component calculations.
82  void prepare_solution(const size_t /*output_l_max*/,
83  const double /*time*/) const noexcept override {}
84
85  /*!
86  * \brief Compute the spherical coordinate metric from the closed-form
87  * rotating Schwarzschild metric.
88  *
89  * \details The rotating Schwarzschild takes the coordinate form
90  * \cite Barkett2019uae,
91  *
92  * \f{align}{
93  * ds^2 = -\left(1 - \frac{2 M}{r} - \omega^2 r^2 \sin^2 \theta\right) dt^2
94  * + \frac{1}{1 - \frac{2 M}{r}} dr^2
95  * + 2 \omega r^2 \sin^2 \theta dt d\phi + r^2 d\Omega^2
96  * \f}
97  */
98  void spherical_metric(
102  size_t l_max, double time) const noexcept override;
103
104  /*!
105  * \brief Compute the radial derivative of the spherical coordinate metric
106  * from the closed-form rotating Schwarzschild metric.
107  *
108  * \details The rotating Schwarzschild takes the coordinate form
109  * \cite Barkett2019uae,
110  *
111  * \f{align}{
112  * \partial_r g_{a b} dx^a dx^b =& -\left(\frac{2 M}{r^2} - 2 \omega^2 r
113  * \sin^2 \theta\right) dt^2 - \frac{2 M}{(r - 2 M)^2} dr^2
114  * + 4 \omega r \sin^2 \theta dt d\phi + 2 r d\Omega^2
115  * \f}
116  */
117  void dr_spherical_metric(
121  size_t l_max, double time) const noexcept override;
122
123  /*!
124  * \brief The time derivative of the spherical coordinate metric in the
125  * rotating Schwarzschild metric vanishes.
126  */
127  void dt_spherical_metric(
131  size_t l_max, double time) const noexcept override;
132
133  using WorldtubeData::variables_impl;
134
136
137  /// The News vanishes in the rotating Schwarzschild metric
138  void variables_impl(
140  size_t l_max, double time,
141  tmpl::type_<Tags::News> /*meta*/) const noexcept override;
142
143  double frequency_ = std::numeric_limits<double>::signaling_NaN();
145 };
146 } // namespace Cce::Solutions
CharmPupable.hpp
Definition: RotatingSchwarzschild.hpp:38
Literals.hpp
Options.hpp
vector
Cce::Solutions::RotatingSchwarzschild::spherical_metric
void spherical_metric(gsl::not_null< tnsr::aa< DataVector, 3, ::Frame::Spherical<::Frame::Inertial >> * > spherical_metric, size_t l_max, double time) const noexcept override
Compute the spherical coordinate metric from the closed-form rotating Schwarzschild metric.
SpinWeighted
Make a spin-weighted type T with spin-weight Spin. Mathematical operators are restricted to addition,...
Definition: SpinWeighted.hpp:24
Cce::Solutions::SphericalMetricData
Abstract base class for analytic worldtube data most easily derived in spherical coordinate form.
Definition: SphericalMetricData.hpp:42
Cce::Solutions::RotatingSchwarzschild::dr_spherical_metric
void dr_spherical_metric(gsl::not_null< tnsr::aa< DataVector, 3, ::Frame::Spherical<::Frame::Inertial >> * > dr_spherical_metric, size_t l_max, double time) const noexcept override
Compute the radial derivative of the spherical coordinate metric from the closed-form rotating Schwar...
Cce::Solutions::RotatingSchwarzschild::prepare_solution
void prepare_solution(const size_t, const double) const noexcept override
A no-op as the rotating Schwarzschild solution does not have substantial shared computation to prepar...
Definition: RotatingSchwarzschild.hpp:82
cstddef
Cce::Solutions::SphericalMetricData::variables_impl
void variables_impl(gsl::not_null< tnsr::aa< DataVector, 3 > * > spacetime_metric, size_t l_max, double time, tmpl::type_< gr::Tags::SpacetimeMetric< 3, ::Frame::Inertial, DataVector >>) const noexcept override
Computes the Cartesian spacetime metric from the spherical solution provided by the derived classes.
DataVector
Stores a collection of function values.
Definition: DataVector.hpp:46
std::numeric_limits::signaling_NaN
T signaling_NaN(T... args)
memory
Frame::Spherical
Represents a spherical-coordinate frame that is associated with a Cartesian frame,...
Definition: IndexType.hpp:54
Scalar
Tensor< T, Symmetry<>, index_list<> > Scalar
Definition: TypeAliases.hpp:21
limits
Gsl.hpp
Cce::Solutions::RotatingSchwarzschild::variables_impl
void variables_impl(gsl::not_null< Scalar< SpinWeighted< ComplexDataVector, -2 >> * > news, size_t l_max, double time, tmpl::type_< Tags::News >) const noexcept override
The News vanishes in the rotating Schwarzschild metric.
Options::String
const char *const String
The string used in option structs.
Definition: Options.hpp:32
Cce::Solutions::RotatingSchwarzschild::dt_spherical_metric
void dt_spherical_metric(gsl::not_null< tnsr::aa< DataVector, 3, ::Frame::Spherical<::Frame::Inertial >> * > dt_spherical_metric, size_t l_max, double time) const noexcept override
The time derivative of the spherical coordinate metric in the rotating Schwarzschild metric vanishes.
complex
Cce::Solutions::RotatingSchwarzschild::Frequency
Definition: RotatingSchwarzschild.hpp:50
Cce::Solutions::RotatingSchwarzschild::Mass
Definition: RotatingSchwarzschild.hpp:44
Cce::Solutions::RotatingSchwarzschild
Computes the analytic data for the rotating Schwarzschild solution described in , section VI....
Definition: RotatingSchwarzschild.hpp:37
ComplexDataVector
Stores a collection of complex function values.
Definition: ComplexDataVector.hpp:53
std::unique_ptr
Cce::Solutions
Analytic solutions for CCE worldtube data and corresponding waveform News.
Definition: BouncingBlackHole.hpp:25
TMPL.hpp
gsl::not_null
Require a pointer to not be a nullptr