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