Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <type_traits>
7 :
8 : #include "DataStructures/SpinWeighted.hpp"
9 : #include "DataStructures/Tags.hpp"
10 : #include "DataStructures/Tags/TempTensor.hpp"
11 : #include "DataStructures/Tensor/Tensor.hpp"
12 : #include "Evolution/Systems/Cce/Tags.hpp"
13 : #include "NumericalAlgorithms/SpinWeightedSphericalHarmonics/SwshTags.hpp"
14 : #include "Utilities/Gsl.hpp"
15 : #include "Utilities/TMPL.hpp"
16 :
17 : /// \cond
18 : class ComplexDataVector;
19 : /// \endcond
20 :
21 : namespace Cce {
22 :
23 : namespace detail {
24 : template <typename BondiVariable>
25 : struct integrand_terms_to_compute_for_bondi_variable_impl;
26 :
27 : // template specializations for the individual tags
28 : template <>
29 : struct integrand_terms_to_compute_for_bondi_variable_impl<Tags::BondiBeta> {
30 : using type = tmpl::list<Tags::Integrand<Tags::BondiBeta>>;
31 : };
32 : template <>
33 : struct integrand_terms_to_compute_for_bondi_variable_impl<Tags::BondiQ> {
34 : using type = tmpl::list<Tags::PoleOfIntegrand<Tags::BondiQ>,
35 : Tags::RegularIntegrand<Tags::BondiQ>>;
36 : };
37 : template <>
38 : struct integrand_terms_to_compute_for_bondi_variable_impl<Tags::BondiU> {
39 : using type = tmpl::list<Tags::Integrand<Tags::BondiU>>;
40 : };
41 : template <>
42 : struct integrand_terms_to_compute_for_bondi_variable_impl<Tags::BondiW> {
43 : using type = tmpl::list<Tags::PoleOfIntegrand<Tags::BondiW>,
44 : Tags::RegularIntegrand<Tags::BondiW>>;
45 : };
46 : template <>
47 : struct integrand_terms_to_compute_for_bondi_variable_impl<Tags::BondiH> {
48 : using type = tmpl::list<Tags::PoleOfIntegrand<Tags::BondiH>,
49 : Tags::RegularIntegrand<Tags::BondiH>,
50 : Tags::LinearFactor<Tags::BondiH>,
51 : Tags::LinearFactorForConjugate<Tags::BondiH>>;
52 : };
53 :
54 : template <>
55 : struct integrand_terms_to_compute_for_bondi_variable_impl<Tags::KleinGordonPi> {
56 : using type = tmpl::list<Tags::PoleOfIntegrand<Tags::KleinGordonPi>,
57 : Tags::RegularIntegrand<Tags::KleinGordonPi>>;
58 : };
59 :
60 : void klein_gordon_rhs_npsi1(
61 : gsl::not_null<SpinWeighted<ComplexDataVector, 0>*> result,
62 : const SpinWeighted<ComplexDataVector, 1>& eth_beta,
63 : const SpinWeighted<ComplexDataVector, 1>& eth_kg_psi,
64 : const SpinWeighted<ComplexDataVector, 0>& eth_ethbar_kg_psi,
65 : const SpinWeighted<ComplexDataVector, 0>& bondi_k);
66 :
67 : void klein_gordon_rhs_npsi2(
68 : gsl::not_null<SpinWeighted<ComplexDataVector, 0>*> result,
69 : const SpinWeighted<ComplexDataVector, 2>& j,
70 : const SpinWeighted<ComplexDataVector, 2>& eth_eth_kg_psi,
71 : const SpinWeighted<ComplexDataVector, 1>& eth_beta,
72 : const SpinWeighted<ComplexDataVector, 1>& eth_kg_psi,
73 : const SpinWeighted<ComplexDataVector, 1>& ethbar_j);
74 :
75 : void klein_gordon_rhs_npsi3(
76 : gsl::not_null<SpinWeighted<ComplexDataVector, 0>*> result,
77 : const SpinWeighted<ComplexDataVector, 1>& eth_k,
78 : const SpinWeighted<ComplexDataVector, 1>& eth_kg_psi);
79 :
80 : void klein_gordon_rhs_npsi4_divided_by_one_minues_y_squared(
81 : gsl::not_null<SpinWeighted<ComplexDataVector, 0>*> result,
82 : const SpinWeighted<ComplexDataVector, 1>& eth_kg_psi,
83 : const SpinWeighted<ComplexDataVector, 1>& dy_bondi_u,
84 : const SpinWeighted<ComplexDataVector, 0>& ethbar_u,
85 : const SpinWeighted<ComplexDataVector, 1>& bondi_u,
86 : const SpinWeighted<ComplexDataVector, 1>& eth_dy_kg_psi,
87 : const SpinWeighted<ComplexDataVector, 0>& dy_kg_psi,
88 : const SpinWeighted<ComplexDataVector, 0>& bondi_r,
89 : const SpinWeighted<ComplexDataVector, 1>& eth_r_divided_by_r);
90 :
91 : void klein_gordon_rhs_tau(
92 : gsl::not_null<SpinWeighted<ComplexDataVector, 0>*> result,
93 : const SpinWeighted<ComplexDataVector, 0>& one_minus_y,
94 : const SpinWeighted<ComplexDataVector, 0>& dy_w,
95 : const SpinWeighted<ComplexDataVector, 0>& dy_kg_psi,
96 : const SpinWeighted<ComplexDataVector, 0>& dy_dy_kg_psi,
97 : const SpinWeighted<ComplexDataVector, 0>& bondi_w,
98 : const SpinWeighted<ComplexDataVector, 0>& bondi_r);
99 : } // namespace detail
100 :
101 : /// \brief A struct for providing a `tmpl::list` of integrand tags that need to
102 : /// be computed before integration can proceed for a given Bondi variable tag.
103 : template <typename BondiVariable>
104 1 : using integrand_terms_to_compute_for_bondi_variable =
105 : typename detail::integrand_terms_to_compute_for_bondi_variable_impl<
106 : BondiVariable>::type;
107 :
108 : /*!
109 : * \brief Computes one of the inputs for the integration of one of the
110 : * Characteristic hypersurface equations.
111 : *
112 : * \details The template argument must be one of the integrand-related prefix
113 : * tags templated on a Bondi quantity tag for which that integrand is required.
114 : * The relevant prefix tags are `Tags::Integrand`, `Tags::PoleOfIntegrand`,
115 : * `Tags::RegularIntegrand`, `Tags::LinearFactor`, and
116 : * `Tags::LinearFactorForConjugate`. The Bondi quantity tags that these tags may
117 : * wrap are `Tags::BondiBeta`, `Tags::BondiQ`, `Tags::BondiU`, `Tags::BondiW`,
118 : * and `Tags::BondiH`.
119 : *
120 : * The integrand terms which may be computed for a given Bondi variable are
121 : * enumerated in the type alias `integrand_terms_to_compute_for_bondi_variable`,
122 : * which takes as a single template argument the tag for which integrand terms
123 : * would be computed, and is a `tmpl::list` of the integrand terms needed.
124 : *
125 : * The resulting quantity is returned by `not_null` pointer, and the required
126 : * argument tags are given in `return_tags` and `argument_tags` type aliases,
127 : * where the `return_tags` are passed by `not_null` pointer (so include
128 : * temporary buffers) and the `argument_tags` are passed by const reference.
129 : *
130 : * Additional mathematical details for each of the computations can be found in
131 : * the template specializations of this struct. All of the specializations have
132 : * a static `apply` function which takes as arguments
133 : * `SpinWeighted<ComplexDataVector, N>`s for each of the Bondi arguments.
134 : */
135 : template <typename IntegrandTag>
136 1 : struct ComputeBondiIntegrand;
137 :
138 : /*!
139 : * \brief Computes the integrand (right-hand side) of the equation which
140 : * determines the radial (y) dependence of the Bondi quantity \f$\beta\f$.
141 : *
142 : * \details The quantity \f$\beta\f$ is defined via the Bondi form of the
143 : * metric:
144 : * \f[
145 : * ds^2 = - \left(e^{2 \beta} (1 + r W) - r^2 h_{AB} U^A U^B\right) du^2 - 2
146 : * e^{2 \beta} du dr - 2 r^2 h_{AB} U^B du dx^A + r^2 h_{A B} dx^A dx^B. \f]
147 : * Additional quantities \f$J\f$ and \f$K\f$ are defined using a spherical
148 : * angular dyad \f$q^A\f$:
149 : * \f[ J \equiv h_{A B} q^A q^B, K \equiv h_{A B} q^A
150 : * \bar{q}^B.\f]
151 : * See \cite Bishop1997ik \cite Handmer2014qha for full details.
152 : *
153 : * We write the equations of motion in the compactified coordinate \f$ y \equiv
154 : * 1 - 2 R/ r\f$, where \f$r(u, \theta, \phi)\f$ is the Bondi radius of the
155 : * \f$y=\f$ constant surface and \f$R(u,\theta,\phi)\f$ is the Bondi radius of
156 : * the worldtube. The equation which determines \f$\beta\f$ on a surface of
157 : * constant \f$u\f$ given \f$J\f$ on the same surface is
158 : * \f[\partial_y (\beta) =
159 : * \frac{1}{8} (-1 + y) \left(\partial_y (J) \partial_y(\bar{J})
160 : * - \frac{(\partial_y (J \bar{J}))^2}{4 K^2}\right). \f]
161 : */
162 : template <>
163 1 : struct ComputeBondiIntegrand<Tags::Integrand<Tags::BondiBeta>> {
164 : public:
165 0 : using pre_swsh_derivative_tags =
166 : tmpl::list<Tags::Dy<Tags::BondiJ>, Tags::BondiJ>;
167 0 : using swsh_derivative_tags = tmpl::list<>;
168 0 : using integration_independent_tags = tmpl::list<Tags::OneMinusY>;
169 0 : using temporary_tags = tmpl::list<>;
170 :
171 0 : using return_tags = tmpl::append<tmpl::list<Tags::Integrand<Tags::BondiBeta>>,
172 : temporary_tags>;
173 0 : using argument_tags =
174 : tmpl::append<pre_swsh_derivative_tags, swsh_derivative_tags,
175 : integration_independent_tags>;
176 :
177 : template <typename... Args>
178 0 : static void apply(
179 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 0>>*>
180 : integrand_for_beta,
181 : const Args&... args) {
182 : apply_impl(make_not_null(&get(*integrand_for_beta)), get(args)...);
183 : }
184 :
185 : private:
186 0 : static void apply_impl(
187 : gsl::not_null<SpinWeighted<ComplexDataVector, 0>*> integrand_for_beta,
188 : const SpinWeighted<ComplexDataVector, 2>& dy_j,
189 : const SpinWeighted<ComplexDataVector, 2>& j,
190 : const SpinWeighted<ComplexDataVector, 0>& one_minus_y);
191 : };
192 :
193 : /*!
194 : * \brief Computes the pole part of the integrand (right-hand side) of the
195 : * equation which determines the radial (y) dependence of the Bondi quantity
196 : * \f$Q\f$.
197 : *
198 : * \details The quantity \f$Q\f$ is defined via the Bondi form of the metric:
199 : * \f[ds^2 = - \left(e^{2 \beta} (1 + r W) - r^2 h_{AB} U^A U^B\right) du^2 - 2
200 : * e^{2 \beta} du dr - 2 r^2 h_{AB} U^B du dx^A + r^2 h_{A B} dx^A dx^B. \f]
201 : * Additional quantities \f$J\f$ and \f$K\f$ are defined using a spherical
202 : * angular dyad \f$q^A\f$:
203 : * \f[ J \equiv h_{A B} q^A q^B, K \equiv h_{A B} q^A \bar{q}^B,\f]
204 : * and \f$Q\f$ is defined as a supplemental variable for radial integration of
205 : * \f$U\f$:
206 : * \f[ Q_A = r^2 e^{-2\beta} h_{AB} \partial_r U^B\f]
207 : * and \f$Q = Q_A q^A\f$. See \cite Bishop1997ik \cite Handmer2014qha for full
208 : * details.
209 : *
210 : * We write the equations of motion in the compactified coordinate \f$ y \equiv
211 : * 1 - 2 R/ r\f$, where \f$r(u, \theta, \phi)\f$ is the Bondi radius of the
212 : * \f$y=\f$ constant surface and \f$R(u,\theta,\phi)\f$ is the Bondi radius of
213 : * the worldtube. The equation which determines \f$Q\f$ on a surface of constant
214 : * \f$u\f$ given \f$J\f$ and \f$\beta\f$ on the same surface is written as
215 : * \f[(1 - y) \partial_y Q + 2 Q = A_Q + (1 - y) B_Q.\f]
216 : * We refer to \f$A_Q\f$ as the "pole part" of the integrand and \f$B_Q\f$
217 : * as the "regular part". The pole part is computed by this function, and has
218 : * the expression
219 : * \f[A_Q = -4 \eth \beta.\f]
220 : */
221 : template <>
222 1 : struct ComputeBondiIntegrand<Tags::PoleOfIntegrand<Tags::BondiQ>> {
223 : public:
224 0 : using pre_swsh_derivative_tags = tmpl::list<>;
225 0 : using swsh_derivative_tags =
226 : tmpl::list<Spectral::Swsh::Tags::Derivative<Tags::BondiBeta,
227 : Spectral::Swsh::Tags::Eth>>;
228 0 : using integration_independent_tags = tmpl::list<>;
229 0 : using temporary_tags = tmpl::list<>;
230 :
231 0 : using return_tags =
232 : tmpl::append<tmpl::list<Tags::PoleOfIntegrand<Tags::BondiQ>>,
233 : temporary_tags>;
234 0 : using argument_tags =
235 : tmpl::append<pre_swsh_derivative_tags, swsh_derivative_tags,
236 : integration_independent_tags>;
237 :
238 : template <typename... Args>
239 0 : static void apply(
240 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 1>>*>
241 : pole_of_integrand_for_q,
242 : const Args&... args) {
243 : apply_impl(make_not_null(&get(*pole_of_integrand_for_q)), get(args)...);
244 : }
245 :
246 : private:
247 0 : static void apply_impl(gsl::not_null<SpinWeighted<ComplexDataVector, 1>*>
248 : pole_of_integrand_for_q,
249 : const SpinWeighted<ComplexDataVector, 1>& eth_beta);
250 : };
251 :
252 : /*!
253 : * \brief Computes the regular part of the integrand (right-hand side) of the
254 : * equation which determines the radial (y) dependence of the Bondi quantity
255 : * \f$Q\f$.
256 : *
257 : * \details The quantity \f$Q\f$ is defined via the Bondi form of the metric:
258 : * \f[ds^2 = - \left(e^{2 \beta} (1 + r W) - r^2 h_{AB} U^A U^B\right) du^2 - 2
259 : * e^{2 \beta} du dr - 2 r^2 h_{AB} U^B du dx^A + r^2 h_{A B} dx^A dx^B. \f]
260 : * Additional quantities \f$J\f$ and \f$K\f$ are defined using a spherical
261 : * angular dyad \f$q^A\f$:
262 : * \f[ J \equiv h_{A B} q^A q^B, K \equiv h_{A B} q^A \bar{q}^B,\f]
263 : * and \f$Q\f$ is defined as a supplemental variable for radial integration of
264 : * \f$U\f$:
265 : * \f[ Q_A = r^2 e^{-2\beta} h_{AB} \partial_r U^B\f]
266 : * and \f$Q = Q_A q^A\f$. See \cite Bishop1997ik \cite Handmer2014qha for
267 : * full details.
268 : *
269 : * We write the equations of motion in the compactified coordinate \f$ y \equiv
270 : * 1 - 2 R/ r\f$, where \f$r(u, \theta, \phi)\f$ is the Bondi radius of the
271 : * \f$y=\f$ constant surface and \f$R(u,\theta,\phi)\f$ is the Bondi radius of
272 : * the worldtube. The equation which determines \f$Q\f$ on a surface of constant
273 : * \f$u\f$ given \f$J\f$ and \f$\beta\f$ on the same surface is written as
274 : * \f[(1 - y) \partial_y Q + 2 Q = A_Q + (1 - y) B_Q. \f]
275 : * We refer to \f$A_Q\f$ as the "pole part" of the integrand and \f$B_Q\f$ as
276 : * the "regular part". The regular part is computed by this function, and has
277 : * the expression
278 : * \f[ B_Q = - \left(2 \mathcal{A}_Q + \frac{2
279 : * \bar{\mathcal{A}_Q} J}{K} - 2 \partial_y (\eth (\beta)) +
280 : * \frac{\partial_y (\bar{\eth} (J))}{K}\right), \f]
281 : * where
282 : * \f[ \mathcal{A}_Q = - \tfrac{1}{4} \eth (\bar{J} \partial_y (J)) +
283 : * \tfrac{1}{4} J \partial_y (\eth (\bar{J})) - \tfrac{1}{4} \eth (\bar{J})
284 : * \partial_y (J) + \frac{\eth (J \bar{J}) \partial_y (J \bar{J})}{8 K^2} -
285 : * \frac{\bar{J} \eth (R) \partial_y (J)}{4 R}. \f].
286 : */
287 : template <>
288 1 : struct ComputeBondiIntegrand<Tags::RegularIntegrand<Tags::BondiQ>> {
289 : public:
290 0 : using pre_swsh_derivative_tags =
291 : tmpl::list<Tags::Dy<Tags::BondiBeta>, Tags::Dy<Tags::BondiJ>,
292 : Tags::BondiJ>;
293 0 : using swsh_derivative_tags = tmpl::list<
294 : Spectral::Swsh::Tags::Derivative<Tags::Dy<Tags::BondiBeta>,
295 : Spectral::Swsh::Tags::Eth>,
296 : Spectral::Swsh::Tags::Derivative<
297 : ::Tags::Multiplies<Tags::BondiJ, Tags::BondiJbar>,
298 : Spectral::Swsh::Tags::Eth>,
299 : Spectral::Swsh::Tags::Derivative<
300 : ::Tags::Multiplies<Tags::BondiJbar, Tags::Dy<Tags::BondiJ>>,
301 : Spectral::Swsh::Tags::Eth>,
302 : Spectral::Swsh::Tags::Derivative<Tags::Dy<Tags::BondiJ>,
303 : Spectral::Swsh::Tags::Ethbar>,
304 : Spectral::Swsh::Tags::Derivative<Tags::BondiJ,
305 : Spectral::Swsh::Tags::Ethbar>>;
306 0 : using integration_independent_tags =
307 : tmpl::list<Tags::EthRDividedByR, Tags::BondiK>;
308 0 : using temporary_tags =
309 : tmpl::list<::Tags::SpinWeighted<::Tags::TempScalar<0, ComplexDataVector>,
310 : std::integral_constant<int, 1>>>;
311 :
312 0 : using return_tags =
313 : tmpl::append<tmpl::list<Tags::RegularIntegrand<Tags::BondiQ>>,
314 : temporary_tags>;
315 0 : using argument_tags =
316 : tmpl::append<pre_swsh_derivative_tags, swsh_derivative_tags,
317 : integration_independent_tags>;
318 :
319 : template <typename... Args>
320 0 : static void apply(
321 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 1>>*>
322 : regular_integrand_for_q,
323 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 1>>*>
324 : script_aq,
325 : const Args&... args) {
326 : apply_impl(make_not_null(&get(*regular_integrand_for_q)),
327 : make_not_null(&get(*script_aq)), get(args)...);
328 : }
329 :
330 : private:
331 0 : static void apply_impl(
332 : gsl::not_null<SpinWeighted<ComplexDataVector, 1>*>
333 : regular_integrand_for_q,
334 : gsl::not_null<SpinWeighted<ComplexDataVector, 1>*> script_aq,
335 : const SpinWeighted<ComplexDataVector, 0>& dy_beta,
336 : const SpinWeighted<ComplexDataVector, 2>& dy_j,
337 : const SpinWeighted<ComplexDataVector, 2>& j,
338 : const SpinWeighted<ComplexDataVector, 1>& eth_dy_beta,
339 : const SpinWeighted<ComplexDataVector, 1>& eth_j_jbar,
340 : const SpinWeighted<ComplexDataVector, 1>& eth_jbar_dy_j,
341 : const SpinWeighted<ComplexDataVector, 1>& ethbar_dy_j,
342 : const SpinWeighted<ComplexDataVector, 1>& ethbar_j,
343 : const SpinWeighted<ComplexDataVector, 1>& eth_r_divided_by_r,
344 : const SpinWeighted<ComplexDataVector, 0>& k);
345 : };
346 :
347 : /*!
348 : * \brief Computes the integrand (right-hand side) of the equation which
349 : * determines the radial (y) dependence of the Bondi quantity \f$U\f$.
350 : *
351 : * \details The quantity \f$U\f$ is defined via the Bondi form of the metric:
352 : * \f[ds^2 = - \left(e^{2 \beta} (1 + r W) - r^2 h_{AB} U^A U^B\right) du^2 - 2
353 : * e^{2 \beta} du dr - 2 r^2 h_{AB} U^B du dx^A + r^2 h_{A B} dx^A dx^B. \f]
354 : * Additional quantities \f$J\f$ and \f$K\f$ are defined using a spherical
355 : * angular dyad \f$q^A\f$:
356 : * \f[ J \equiv h_{A B} q^A q^B, K \equiv h_{A B} q^A \bar{q}^B,\f]
357 : * and \f$Q\f$ is defined as a supplemental variable for radial integration of
358 : * \f$U\f$:
359 : * \f[ Q_A = r^2 e^{-2\beta} h_{AB} \partial_r U^B\f]
360 : * and \f$U = U_A q^A\f$. See \cite Bishop1997ik \cite Handmer2014qha for full
361 : * details.
362 : *
363 : * We write the equations of motion in the compactified coordinate \f$ y \equiv
364 : * 1 - 2 R/ r\f$, where \f$r(u, \theta, \phi)\f$ is the Bondi radius of the
365 : * \f$y=\f$ constant surface and \f$R(u,\theta,\phi)\f$ is the Bondi radius of
366 : * the worldtube. The equation which determines \f$U\f$ on a surface of constant
367 : * \f$u\f$ given \f$J\f$, \f$\beta\f$, and \f$Q\f$ on the same surface is
368 : * written as
369 : * \f[\partial_y U = \frac{e^{2\beta}}{2 R} (K Q - J \bar{Q}). \f]
370 : */
371 : template <>
372 1 : struct ComputeBondiIntegrand<Tags::Integrand<Tags::BondiU>> {
373 : public:
374 0 : using pre_swsh_derivative_tags =
375 : tmpl::list<Tags::Exp2Beta, Tags::BondiJ, Tags::BondiQ>;
376 0 : using swsh_derivative_tags = tmpl::list<>;
377 0 : using integration_independent_tags = tmpl::list<Tags::BondiK, Tags::BondiR>;
378 0 : using temporary_tags = tmpl::list<>;
379 :
380 0 : using return_tags =
381 : tmpl::append<tmpl::list<Tags::Integrand<Tags::BondiU>>, temporary_tags>;
382 0 : using argument_tags =
383 : tmpl::append<pre_swsh_derivative_tags, swsh_derivative_tags,
384 : integration_independent_tags>;
385 :
386 : template <typename... Args>
387 0 : static void apply(
388 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 1>>*>
389 : regular_integrand_for_u,
390 : const Args&... args) {
391 : apply_impl(make_not_null(&get(*regular_integrand_for_u)), get(args)...);
392 : }
393 :
394 : private:
395 0 : static void apply_impl(gsl::not_null<SpinWeighted<ComplexDataVector, 1>*>
396 : regular_integrand_for_u,
397 : const SpinWeighted<ComplexDataVector, 0>& exp_2_beta,
398 : const SpinWeighted<ComplexDataVector, 2>& j,
399 : const SpinWeighted<ComplexDataVector, 1>& q,
400 : const SpinWeighted<ComplexDataVector, 0>& k,
401 : const SpinWeighted<ComplexDataVector, 0>& r);
402 : };
403 :
404 : /*!
405 : * \brief Computes the pole part of the integrand (right-hand side) of the
406 : * equation which determines the radial (y) dependence of the Bondi quantity
407 : * \f$W\f$.
408 : *
409 : * \details The quantity \f$W\f$ is defined via the Bondi form of the metric:
410 : * \f[ds^2 = - \left(e^{2 \beta} (1 + r W) - r^2 h_{AB} U^A U^B\right) du^2 - 2
411 : * e^{2 \beta} du dr - 2 r^2 h_{AB} U^B du dx^A + r^2 h_{A B} dx^A dx^B. \f]
412 : * Additional quantities \f$J\f$ and \f$K\f$ are defined using a spherical
413 : * angular dyad \f$q^A\f$:
414 : * \f[ J \equiv h_{A B} q^A q^B, K \equiv h_{A B} q^A \bar{q}^B.\f]
415 : * See \cite Bishop1997ik \cite Handmer2014qha for full details.
416 : *
417 : * We write the equations of motion in the compactified coordinate \f$ y \equiv
418 : * 1 - 2 R/ r\f$, where \f$r(u, \theta, \phi)\f$ is the Bondi radius of the
419 : * \f$y=\f$ constant surface and \f$R(u,\theta,\phi)\f$ is the Bondi radius of
420 : * the worldtube. The equation which determines \f$W\f$ on a surface of constant
421 : * \f$u\f$ given \f$J\f$,\f$\beta\f$, \f$Q\f$, and \f$U\f$ on the same surface
422 : * is written as
423 : * \f[(1 - y) \partial_y W + 2 W = A_W + (1 - y) B_W.\f] We refer
424 : * to \f$A_W\f$ as the "pole part" of the integrand and \f$B_W\f$ as the
425 : * "regular part". The pole part is computed by this function, and has the
426 : * expression
427 : * \f[A_W = \eth (\bar{U}) + \bar{\eth} (U).\f]
428 : */
429 : template <>
430 1 : struct ComputeBondiIntegrand<Tags::PoleOfIntegrand<Tags::BondiW>> {
431 : public:
432 0 : using pre_swsh_derivative_tags = tmpl::list<>;
433 0 : using swsh_derivative_tags = tmpl::list<Spectral::Swsh::Tags::Derivative<
434 : Tags::BondiU, Spectral::Swsh::Tags::Ethbar>>;
435 0 : using integration_independent_tags = tmpl::list<>;
436 0 : using temporary_tags = tmpl::list<>;
437 :
438 0 : using return_tags =
439 : tmpl::append<tmpl::list<Tags::PoleOfIntegrand<Tags::BondiW>>,
440 : temporary_tags>;
441 0 : using argument_tags =
442 : tmpl::append<pre_swsh_derivative_tags, swsh_derivative_tags,
443 : integration_independent_tags>;
444 :
445 : template <typename... Args>
446 0 : static void apply(
447 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 0>>*>
448 : pole_of_integrand_for_w,
449 : const Args&... args) {
450 : apply_impl(make_not_null(&get(*pole_of_integrand_for_w)), get(args)...);
451 : }
452 :
453 : private:
454 0 : static void apply_impl(gsl::not_null<SpinWeighted<ComplexDataVector, 0>*>
455 : pole_of_integrand_for_w,
456 : const SpinWeighted<ComplexDataVector, 0>& ethbar_u);
457 : };
458 :
459 : /*!
460 : * \brief Computes the regular part of the integrand (right-hand side) of the
461 : * equation which determines the radial (y) dependence of the Bondi quantity
462 : * \f$W\f$.
463 : *
464 : * \details The quantity \f$W\f$ is defined via the Bondi form of the metric:
465 : * \f[ds^2 = - \left(e^{2 \beta} (1 + r W) - r^2 h_{AB} U^A U^B\right) du^2 - 2
466 : * e^{2 \beta} du dr - 2 r^2 h_{AB} U^B du dx^A + r^2 h_{A B} dx^A dx^B. \f]
467 : * Additional quantities \f$J\f$ and \f$K\f$ are defined using a spherical
468 : * angular dyad \f$q^A\f$:
469 : * \f[ J \equiv h_{A B} q^A q^B, K \equiv h_{A B} q^A \bar{q}^B,\f]
470 : * See \cite Bishop1997ik \cite Handmer2014qha for full details.
471 : *
472 : * We write the equations of motion in the compactified coordinate \f$ y \equiv
473 : * 1 - 2 R/ r\f$, where \f$r(u, \theta, \phi)\f$ is the Bondi radius of the
474 : * \f$y=\f$ constant surface and \f$R(u,\theta,\phi)\f$ is the Bondi radius of
475 : * the worldtube. The equation which determines \f$W\f$ on a surface of constant
476 : * \f$u\f$ given \f$J\f$, \f$\beta\f$, \f$Q\f$, \f$U\f$ on the same surface is
477 : * written as
478 : * \f[(1 - y) \partial_y W + 2 W = A_W + (1 - y) B_W. \f]
479 : * We refer to \f$A_W\f$ as the "pole part" of the integrand and \f$B_W\f$ as
480 : * the "regular part". The regular part is computed by this function, and has
481 : * the expression
482 : * \f[ B_W = \tfrac{1}{4} \partial_y (\eth (\bar{U})) + \tfrac{1}{4} \partial_y
483 : * (\bar{\eth} (U)) - \frac{1}{2 R} + \frac{e^{2 \beta} (\mathcal{A}_W +
484 : * \bar{\mathcal{A}_W})}{4 R}, \f]
485 : * where
486 : * \f{align*}
487 : * \mathcal{A}_W =& - \eth (\beta) \eth (\bar{J}) + \tfrac{1}{2} \bar{\eth}
488 : * (\bar{\eth} (J)) + 2 \bar{\eth} (\beta) \bar{\eth} (J) + (\bar{\eth}
489 : * (\beta))^2 J + \bar{\eth}
490 : * (\bar{\eth} (\beta)) J + \frac{\eth (J \bar{J}) \bar{\eth} (J \bar{J})}{8
491 : * K^3} + \frac{1}{2 K} - \frac{\eth (\bar{\eth} (J \bar{J}))}{8 K} -
492 : * \frac{\eth (J
493 : * \bar{J}) \bar{\eth} (\beta)}{2 K} \nonumber \\
494 : * &- \frac{\eth (\bar{J}) \bar{\eth} (J)}{4 K} - \frac{\eth (\bar{\eth} (J))
495 : * \bar{J}}{4 K} + \tfrac{1}{2} K - \eth (\bar{\eth} (\beta)) K - \eth
496 : * (\beta) \bar{\eth} (\beta) K + \tfrac{1}{4} (- K Q \bar{Q} + J \bar{Q}^2).
497 : * \f}
498 : */
499 : template <>
500 1 : struct ComputeBondiIntegrand<Tags::RegularIntegrand<Tags::BondiW>> {
501 : public:
502 0 : using pre_swsh_derivative_tags =
503 : tmpl::list<Tags::Dy<Tags::BondiU>, Tags::Exp2Beta, Tags::BondiJ,
504 : Tags::BondiQ>;
505 0 : using swsh_derivative_tags = tmpl::list<
506 : Spectral::Swsh::Tags::Derivative<Tags::BondiBeta,
507 : Spectral::Swsh::Tags::Eth>,
508 : Spectral::Swsh::Tags::Derivative<Tags::BondiBeta,
509 : Spectral::Swsh::Tags::EthEth>,
510 : Spectral::Swsh::Tags::Derivative<Tags::BondiBeta,
511 : Spectral::Swsh::Tags::EthEthbar>,
512 : Spectral::Swsh::Tags::Derivative<
513 : Spectral::Swsh::Tags::Derivative<Tags::BondiJ,
514 : Spectral::Swsh::Tags::Ethbar>,
515 : Spectral::Swsh::Tags::Eth>,
516 : Spectral::Swsh::Tags::Derivative<
517 : ::Tags::Multiplies<Tags::BondiJ, Tags::BondiJbar>,
518 : Spectral::Swsh::Tags::EthEthbar>,
519 : Spectral::Swsh::Tags::Derivative<
520 : ::Tags::Multiplies<Tags::BondiJ, Tags::BondiJbar>,
521 : Spectral::Swsh::Tags::Eth>,
522 : Spectral::Swsh::Tags::Derivative<Tags::Dy<Tags::BondiU>,
523 : Spectral::Swsh::Tags::Ethbar>,
524 : Spectral::Swsh::Tags::Derivative<Tags::BondiJ,
525 : Spectral::Swsh::Tags::EthbarEthbar>,
526 : Spectral::Swsh::Tags::Derivative<Tags::BondiJ,
527 : Spectral::Swsh::Tags::Ethbar>>;
528 0 : using integration_independent_tags =
529 : tmpl::list<Tags::EthRDividedByR, Tags::BondiK, Tags::BondiR>;
530 0 : using temporary_tags =
531 : tmpl::list<::Tags::SpinWeighted<::Tags::TempScalar<0, ComplexDataVector>,
532 : std::integral_constant<int, 0>>>;
533 :
534 0 : using return_tags =
535 : tmpl::append<tmpl::list<Tags::RegularIntegrand<Tags::BondiW>>,
536 : temporary_tags>;
537 0 : using argument_tags =
538 : tmpl::append<pre_swsh_derivative_tags, swsh_derivative_tags,
539 : integration_independent_tags>;
540 :
541 : template <typename... Args>
542 0 : static void apply(
543 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 0>>*>
544 : regular_integrand_for_w,
545 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 0>>*>
546 : script_av,
547 : const Args&... args) {
548 : apply_impl(make_not_null(&get(*regular_integrand_for_w)),
549 : make_not_null(&get(*script_av)), get(args)...);
550 : }
551 :
552 : private:
553 0 : static void apply_impl(
554 : gsl::not_null<SpinWeighted<ComplexDataVector, 0>*>
555 : regular_integrand_for_w,
556 : gsl::not_null<SpinWeighted<ComplexDataVector, 0>*> script_av,
557 : const SpinWeighted<ComplexDataVector, 1>& dy_u,
558 : const SpinWeighted<ComplexDataVector, 0>& exp_2_beta,
559 : const SpinWeighted<ComplexDataVector, 2>& j,
560 : const SpinWeighted<ComplexDataVector, 1>& q,
561 : const SpinWeighted<ComplexDataVector, 1>& eth_beta,
562 : const SpinWeighted<ComplexDataVector, 2>& eth_eth_beta,
563 : const SpinWeighted<ComplexDataVector, 0>& eth_ethbar_beta,
564 : const SpinWeighted<ComplexDataVector, 2>& eth_ethbar_j,
565 : const SpinWeighted<ComplexDataVector, 0>& eth_ethbar_j_jbar,
566 : const SpinWeighted<ComplexDataVector, 1>& eth_j_jbar,
567 : const SpinWeighted<ComplexDataVector, 0>& ethbar_dy_u,
568 : const SpinWeighted<ComplexDataVector, 0>& ethbar_ethbar_j,
569 : const SpinWeighted<ComplexDataVector, 1>& ethbar_j,
570 : const SpinWeighted<ComplexDataVector, 1>& eth_r_divided_by_r,
571 : const SpinWeighted<ComplexDataVector, 0>& k,
572 : const SpinWeighted<ComplexDataVector, 0>& r);
573 : };
574 :
575 : /*!
576 : * \brief Computes the pole part of the integrand (right-hand side) of the
577 : * equation which determines the radial (y) dependence of the Bondi quantity
578 : * \f$H\f$.
579 : *
580 : * \details The quantity \f$H \equiv \partial_u J\f$ (evaluated at constant y)
581 : * is defined via the Bondi form of the metric:
582 : * \f[ds^2 = - \left(e^{2 \beta} (1 + r W) - r^2 h_{AB} U^A U^B\right) du^2 - 2
583 : * e^{2 \beta} du dr - 2 r^2 h_{AB} U^B du dx^A + r^2 h_{A B} dx^A dx^B. \f]
584 : * Additional quantities \f$J\f$ and \f$K\f$ are defined using a spherical
585 : * angular dyad \f$q^A\f$:
586 : * \f[ J \equiv h_{A B} q^A q^B, K \equiv h_{A B} q^A \bar{q}^B.\f]
587 : * See \cite Bishop1997ik \cite Handmer2014qha for full details.
588 : *
589 : * We write the equations of motion in the compactified coordinate \f$ y \equiv
590 : * 1 - 2 R/ r\f$, where \f$r(u, \theta, \phi)\f$ is the Bondi radius of the
591 : * \f$y=\f$ constant surface and \f$R(u,\theta,\phi)\f$ is the Bondi radius of
592 : * the worldtube. The equation which determines \f$W\f$ on a surface of constant
593 : * \f$u\f$ given \f$J\f$,\f$\beta\f$, \f$Q\f$, \f$U\f$, and \f$W\f$ on the same
594 : * surface is written as
595 : * \f[(1 - y) \partial_y H + H + (1 - y)(\mathcal{D}_J H
596 : * + \bar{\mathcal{D}}_J \bar{H}) = A_J + (1 - y) B_J.\f]
597 : *
598 : * We refer to \f$A_J\f$ as the "pole part" of the integrand
599 : * and \f$B_J\f$ as the "regular part". The pole part is computed by this
600 : * function, and has the expression
601 : * \f{align*}
602 : * A_J =& - \tfrac{1}{2} \eth (J \bar{U}) - \eth (\bar{U}) J - \tfrac{1}{2}
603 : * \bar{\eth} (U) J - \eth (U) K - \tfrac{1}{2} (\bar{\eth} (J) U) + 2 J W
604 : * \f}
605 : */
606 : template <>
607 1 : struct ComputeBondiIntegrand<Tags::PoleOfIntegrand<Tags::BondiH>> {
608 : public:
609 0 : using pre_swsh_derivative_tags =
610 : tmpl::list<Tags::BondiJ, Tags::BondiU, Tags::BondiW>;
611 0 : using swsh_derivative_tags = tmpl::list<
612 : Spectral::Swsh::Tags::Derivative<Tags::BondiU, Spectral::Swsh::Tags::Eth>,
613 : Spectral::Swsh::Tags::Derivative<Tags::BondiJ,
614 : Spectral::Swsh::Tags::Ethbar>,
615 : Spectral::Swsh::Tags::Derivative<
616 : ::Tags::Multiplies<Tags::BondiJbar, Tags::BondiU>,
617 : Spectral::Swsh::Tags::Ethbar>,
618 : Spectral::Swsh::Tags::Derivative<Tags::BondiU,
619 : Spectral::Swsh::Tags::Ethbar>>;
620 0 : using integration_independent_tags = tmpl::list<Tags::BondiK>;
621 0 : using temporary_tags = tmpl::list<>;
622 :
623 0 : using return_tags =
624 : tmpl::append<tmpl::list<Tags::PoleOfIntegrand<Tags::BondiH>>,
625 : temporary_tags>;
626 0 : using argument_tags =
627 : tmpl::append<pre_swsh_derivative_tags, swsh_derivative_tags,
628 : integration_independent_tags>;
629 :
630 : template <typename... Args>
631 0 : static void apply(
632 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 2>>*>
633 : pole_of_integrand_for_h,
634 : const Args&... args) {
635 : apply_impl(make_not_null(&get(*pole_of_integrand_for_h)), get(args)...);
636 : }
637 :
638 : private:
639 0 : static void apply_impl(
640 : gsl::not_null<SpinWeighted<ComplexDataVector, 2>*>
641 : pole_of_integrand_for_h,
642 : const SpinWeighted<ComplexDataVector, 2>& j,
643 : const SpinWeighted<ComplexDataVector, 1>& u,
644 : const SpinWeighted<ComplexDataVector, 0>& w,
645 : const SpinWeighted<ComplexDataVector, 2>& eth_u,
646 : const SpinWeighted<ComplexDataVector, 1>& ethbar_j,
647 : const SpinWeighted<ComplexDataVector, -2>& ethbar_jbar_u,
648 : const SpinWeighted<ComplexDataVector, 0>& ethbar_u,
649 : const SpinWeighted<ComplexDataVector, 0>& k);
650 : };
651 :
652 : /*!
653 : * \brief Computes the pole part of the integrand (right-hand side) of the
654 : * equation which determines the radial (y) dependence of the Bondi quantity
655 : * \f$H\f$.
656 : *
657 : * \details The quantity \f$H \equiv \partial_u J\f$ (evaluated at constant y)
658 : * is defined via the Bondi form of the metric:
659 : * \f[ds^2 = - \left(e^{2 \beta} (1 + r W) - r^2 h_{AB} U^A U^B\right) du^2 - 2
660 : * e^{2 \beta} du dr - 2 r^2 h_{AB} U^B du dx^A + r^2 h_{A B} dx^A dx^B. \f]
661 : * Additional quantities \f$J\f$ and \f$K\f$ are defined using a spherical
662 : * angular dyad \f$q^A\f$:
663 : * \f[ J \equiv h_{A B} q^A q^B, K \equiv h_{A B} q^A \bar{q}^B.\f]
664 : * See \cite Bishop1997ik \cite Handmer2014qha for full details.
665 : *
666 : * We write the equations of motion in the compactified coordinate \f$ y \equiv
667 : * 1 - 2 R/ r\f$, where \f$r(u, \theta, \phi)\f$ is the Bondi radius of the
668 : * \f$y=\f$ constant surface and \f$R(u,\theta,\phi)\f$ is the Bondi radius of
669 : * the worldtube. The equation which determines \f$H\f$ on a surface of constant
670 : * \f$u\f$ given \f$J\f$,\f$\beta\f$, \f$Q\f$, \f$U\f$, and \f$W\f$ on the same
671 : * surface is written as
672 : * \f[(1 - y) \partial_y H + H + (1 - y)(\mathcal{D}_J H + \bar{\mathcal{D}}_J
673 : * \bar{H}) = A_J + (1 - y) B_J.\f]
674 : * We refer to \f$A_J\f$ as the "pole part" of the integrand
675 : * and \f$B_J\f$ as the "regular part". The pole part is computed by this
676 : * function, and has the expression
677 : * \f{align*}
678 : * B_J =& -\tfrac{1}{2} \left(\eth(\partial_y (J) \bar{U}) + \partial_y
679 : * (\bar{\eth} (J)) U \right) + J (\mathcal{B}_J + \bar{\mathcal{B}}_J) \notag\\
680 : * &+ \frac{e^{2 \beta}}{2 R} \left(\mathcal{C}_J + \eth (\eth (\beta)) -
681 : * \tfrac{1}{2} \eth (Q) - (\mathcal{A}_J + \bar{\mathcal{A}_J}) J +
682 : * \frac{\bar{\mathcal{C}_J} J^2}{K^2} + \frac{\eth (J (-2 \bar{\eth} (\beta) +
683 : * \bar{Q}))}{4 K} - \frac{\eth (\bar{Q}) J}{4 K} + (\eth (\beta) -
684 : * \tfrac{1}{2} Q)^2\right) \notag\\
685 : * &- \partial_y (J) \left(\frac{\eth (U) \bar{J}}{2 K} - \tfrac{1}{2}
686 : * \bar{\eth} (\bar{U}) J K + \tfrac{1}{4} (\eth (\bar{U}) - \bar{\eth} (U))
687 : * K^2 + \frac{1}{2} \frac{\eth (R) \bar{U}}{R} - \frac{1}{2}
688 : * W\right)\notag\\
689 : * &+ \partial_y (\bar{J}) \left(- \tfrac{1}{4} (- \eth (\bar{U}) + \bar{\eth}
690 : * (U)) J^2 + \eth (U) J \left(- \frac{1}{2 K} + \tfrac{1}{2}
691 : * K\right)\right)\notag\\
692 : * &+ (1 - y) \bigg[\frac{1}{2} \left(- \frac{\partial_y (J)}{R} + \frac{2
693 : * \partial_{u} (R) \partial_y (\partial_y (J))}{R} + \partial_y
694 : * (\partial_y (J)) W\right) + \partial_y (J) \left(\tfrac{1}{2} \partial_y (W)
695 : * + \frac{1}{2 R}\right)\bigg]\notag\\
696 : * &+ (1 - y)^2 \bigg[ \frac{\partial_y (\partial_y (J)) }{4 R} \bigg],
697 : * \f}
698 : * where
699 : * \f{align*}
700 : * \mathcal{A}_J =& \tfrac{1}{4} \eth (\eth (\bar{J})) - \frac{1}{4 K^3} -
701 : * \frac{\eth (\bar{\eth} (J \bar{J})) - (\eth (\bar{\eth} (\bar{J})) - 4
702 : \bar{J})
703 : * J}{16 K^3} + \frac{3}{4 K} - \frac{\eth (\bar{\eth} (\beta))}{4 K} \notag\\
704 : * &- \frac{\eth (\bar{\eth} (J)) \bar{J} (1 - \frac{1}{4 K^2})}{4 K} +
705 : * \tfrac{1}{2} \eth (\bar{J}) \left(\eth (\beta) + \frac{\bar{\eth} (J \bar{J})
706 : * J}{4 K^3} - \frac{\bar{\eth} (J) (-1 + 2 K^2)}{4 K^3} - \tfrac{1}{2}
707 : * Q\right)\\
708 : * \mathcal{B}_J =& - \frac{\eth (U) \bar{J} \partial_y (J \bar{J})}{4 K} +
709 : * \tfrac{1}{2} \partial_y (W) + \frac{1}{4 R} + \tfrac{1}{4} \bar{\eth} (J)
710 : * \partial_y (\bar{J}) U - \frac{\bar{\eth} (J \bar{J}) \partial_y (J \bar{J})
711 : * U}{8 K^2} \notag\\&- \tfrac{1}{4} J \partial_y (\eth (\bar{J})) \bar{U} +
712 : * \tfrac{1}{4} (\eth (J \partial_y (\bar{J})) + \frac{J \eth (R)
713 : * \partial_y(\bar{J})}{R}) \bar{U} \\
714 : * &+ (1 - y) \bigg[ \frac{\mathcal{D}_J \partial_{u} (R)
715 : * \partial_y (J)}{R} - \tfrac{1}{4} \partial_y (J) \partial_y (\bar{J}) W +
716 : * \frac{(\partial_y (J \bar{J}))^2 W}{16 K^2} \bigg] \\
717 : * &+ (1 - y)^2 \bigg[ - \frac{\partial_y (J) \partial_y (\bar{J})}{8 R} +
718 : * \frac{(\partial_y (J \bar{J}))^2}{32 K^2 R} \bigg]\\
719 : * \mathcal{C}_J =& \tfrac{1}{2} \bar{\eth} (J) K (\eth (\beta) - \tfrac{1}{2}
720 : * Q)\\ \mathcal{D}_J =& \tfrac{1}{4} \left(-2 \partial_y (\bar{J}) +
721 : * \frac{\bar{J} \partial_y (J \bar{J})}{K^2}\right)
722 : * \f}
723 : */
724 : template <>
725 1 : struct ComputeBondiIntegrand<Tags::RegularIntegrand<Tags::BondiH>> {
726 : public:
727 0 : using pre_swsh_derivative_tags =
728 : tmpl::list<Tags::Dy<Tags::Dy<Tags::BondiJ>>, Tags::Dy<Tags::BondiJ>,
729 : Tags::Dy<Tags::BondiW>, Tags::Exp2Beta, Tags::BondiJ,
730 : Tags::BondiQ, Tags::BondiU, Tags::BondiW>;
731 0 : using swsh_derivative_tags = tmpl::list<
732 : Spectral::Swsh::Tags::Derivative<Tags::BondiBeta,
733 : Spectral::Swsh::Tags::Eth>,
734 : Spectral::Swsh::Tags::Derivative<Tags::BondiBeta,
735 : Spectral::Swsh::Tags::EthEth>,
736 : Spectral::Swsh::Tags::Derivative<Tags::BondiBeta,
737 : Spectral::Swsh::Tags::EthEthbar>,
738 : Spectral::Swsh::Tags::Derivative<
739 : Spectral::Swsh::Tags::Derivative<Tags::BondiJ,
740 : Spectral::Swsh::Tags::Ethbar>,
741 : Spectral::Swsh::Tags::Eth>,
742 : Spectral::Swsh::Tags::Derivative<
743 : ::Tags::Multiplies<Tags::BondiJ, Tags::BondiJbar>,
744 : Spectral::Swsh::Tags::EthEthbar>,
745 : Spectral::Swsh::Tags::Derivative<
746 : ::Tags::Multiplies<Tags::BondiJ, Tags::BondiJbar>,
747 : Spectral::Swsh::Tags::Eth>,
748 : Spectral::Swsh::Tags::Derivative<Tags::BondiQ, Spectral::Swsh::Tags::Eth>,
749 : Spectral::Swsh::Tags::Derivative<Tags::BondiU, Spectral::Swsh::Tags::Eth>,
750 : Spectral::Swsh::Tags::Derivative<
751 : ::Tags::Multiplies<Tags::BondiUbar, Tags::Dy<Tags::BondiJ>>,
752 : Spectral::Swsh::Tags::Eth>,
753 : Spectral::Swsh::Tags::Derivative<Tags::Dy<Tags::BondiJ>,
754 : Spectral::Swsh::Tags::Ethbar>,
755 : Spectral::Swsh::Tags::Derivative<Tags::BondiJ,
756 : Spectral::Swsh::Tags::EthbarEthbar>,
757 : Spectral::Swsh::Tags::Derivative<Tags::BondiJ,
758 : Spectral::Swsh::Tags::Ethbar>,
759 : Spectral::Swsh::Tags::Derivative<
760 : ::Tags::Multiplies<Tags::BondiJbar, Tags::Dy<Tags::BondiJ>>,
761 : Spectral::Swsh::Tags::Ethbar>,
762 : Spectral::Swsh::Tags::Derivative<Tags::JbarQMinus2EthBeta,
763 : Spectral::Swsh::Tags::Ethbar>,
764 : Spectral::Swsh::Tags::Derivative<Tags::BondiQ,
765 : Spectral::Swsh::Tags::Ethbar>,
766 : Spectral::Swsh::Tags::Derivative<Tags::BondiU,
767 : Spectral::Swsh::Tags::Ethbar>>;
768 0 : using integration_independent_tags =
769 : tmpl::list<Tags::DuRDividedByR, Tags::EthRDividedByR, Tags::BondiK,
770 : Tags::OneMinusY, Tags::BondiR>;
771 0 : using temporary_tags =
772 : tmpl::list<::Tags::SpinWeighted<::Tags::TempScalar<0, ComplexDataVector>,
773 : std::integral_constant<int, 0>>,
774 : ::Tags::SpinWeighted<::Tags::TempScalar<1, ComplexDataVector>,
775 : std::integral_constant<int, 0>>,
776 : ::Tags::SpinWeighted<::Tags::TempScalar<0, ComplexDataVector>,
777 : std::integral_constant<int, 2>>>;
778 :
779 0 : using return_tags =
780 : tmpl::append<tmpl::list<Tags::RegularIntegrand<Tags::BondiH>>,
781 : temporary_tags>;
782 0 : using argument_tags =
783 : tmpl::append<pre_swsh_derivative_tags, swsh_derivative_tags,
784 : integration_independent_tags>;
785 :
786 : template <typename... Args>
787 0 : static void apply(
788 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 2>>*>
789 : regular_integrand_for_h,
790 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 0>>*>
791 : script_aj,
792 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 0>>*>
793 : script_bj,
794 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 2>>*>
795 : script_cj,
796 : const Args&... args) {
797 : apply_impl(make_not_null(&get(*regular_integrand_for_h)),
798 : make_not_null(&get(*script_aj)), make_not_null(&get(*script_bj)),
799 : make_not_null(&get(*script_cj)), get(args)...);
800 : }
801 :
802 : private:
803 0 : static void apply_impl(
804 : gsl::not_null<SpinWeighted<ComplexDataVector, 2>*>
805 : regular_integrand_for_h,
806 : gsl::not_null<SpinWeighted<ComplexDataVector, 0>*> script_aj,
807 : gsl::not_null<SpinWeighted<ComplexDataVector, 0>*> script_bj,
808 : gsl::not_null<SpinWeighted<ComplexDataVector, 2>*> script_cj,
809 : const SpinWeighted<ComplexDataVector, 2>& dy_dy_j,
810 : const SpinWeighted<ComplexDataVector, 2>& dy_j,
811 : const SpinWeighted<ComplexDataVector, 0>& dy_w,
812 : const SpinWeighted<ComplexDataVector, 0>& exp_2_beta,
813 : const SpinWeighted<ComplexDataVector, 2>& j,
814 : const SpinWeighted<ComplexDataVector, 1>& q,
815 : const SpinWeighted<ComplexDataVector, 1>& u,
816 : const SpinWeighted<ComplexDataVector, 0>& w,
817 : const SpinWeighted<ComplexDataVector, 1>& eth_beta,
818 : const SpinWeighted<ComplexDataVector, 2>& eth_eth_beta,
819 : const SpinWeighted<ComplexDataVector, 0>& eth_ethbar_beta,
820 : const SpinWeighted<ComplexDataVector, 2>& eth_ethbar_j,
821 : const SpinWeighted<ComplexDataVector, 0>& eth_ethbar_j_jbar,
822 : const SpinWeighted<ComplexDataVector, 1>& eth_j_jbar,
823 : const SpinWeighted<ComplexDataVector, 2>& eth_q,
824 : const SpinWeighted<ComplexDataVector, 2>& eth_u,
825 : const SpinWeighted<ComplexDataVector, 2>& eth_ubar_dy_j,
826 : const SpinWeighted<ComplexDataVector, 1>& ethbar_dy_j,
827 : const SpinWeighted<ComplexDataVector, 0>& ethbar_ethbar_j,
828 : const SpinWeighted<ComplexDataVector, 1>& ethbar_j,
829 : const SpinWeighted<ComplexDataVector, -1>& ethbar_jbar_dy_j,
830 : const SpinWeighted<ComplexDataVector, -2>& ethbar_jbar_q_minus_2_eth_beta,
831 : const SpinWeighted<ComplexDataVector, 0>& ethbar_q,
832 : const SpinWeighted<ComplexDataVector, 0>& ethbar_u,
833 : const SpinWeighted<ComplexDataVector, 0>& du_r_divided_by_r,
834 : const SpinWeighted<ComplexDataVector, 1>& eth_r_divided_by_r,
835 : const SpinWeighted<ComplexDataVector, 0>& k,
836 : const SpinWeighted<ComplexDataVector, 0>& one_minus_y,
837 : const SpinWeighted<ComplexDataVector, 0>& r);
838 : };
839 :
840 : /*!
841 : * \brief Computes the linear factor which multiplies \f$H\f$ in the
842 : * equation which determines the radial (y) dependence of the Bondi quantity
843 : * \f$H\f$.
844 : *
845 : * \details The quantity \f$H \equiv \partial_u J\f$ (evaluated at constant y)
846 : * is defined via the Bondi form of the metric:
847 : * \f[ds^2 = - \left(e^{2 \beta} (1 + r W) - r^2 h_{AB} U^A U^B\right) du^2 - 2
848 : * e^{2 \beta} du dr - 2 r^2 h_{AB} U^B du dx^A + r^2 h_{A B} dx^A dx^B. \f]
849 : * Additional quantities \f$J\f$ and \f$K\f$ are defined using a spherical
850 : * angular dyad \f$q^A\f$:
851 : * \f[ J \equiv h_{A B} q^A q^B, K \equiv h_{A B} q^A \bar{q}^B.\f]
852 : * See \cite Bishop1997ik \cite Handmer2014qha for full details.
853 : *
854 : * We write the equations of motion in the compactified coordinate \f$ y \equiv
855 : * 1 - 2 R/ r\f$, where \f$r(u, \theta, \phi)\f$ is the Bondi radius of the
856 : * \f$y=\f$ constant surface and \f$R(u,\theta,\phi)\f$ is the Bondi radius of
857 : * the worldtube. The equation which determines \f$H\f$ on a surface of constant
858 : * \f$u\f$ given \f$J\f$,\f$\beta\f$, \f$Q\f$, \f$U\f$, and \f$W\f$ on the same
859 : * surface is written as
860 : * \f[(1 - y) \partial_y H + H + (1 - y) J (\mathcal{D}_J
861 : * H + \bar{\mathcal{D}}_J \bar{H}) = A_J + (1 - y) B_J.\f]
862 : * The quantity \f$1 +(1 - y) J \mathcal{D}_J\f$ is the linear factor
863 : * for the non-conjugated \f$H\f$, and is computed from the equation:
864 : * \f[\mathcal{D}_J = \frac{1}{4}(-2 \partial_y \bar{J} + \frac{\bar{J}
865 : * \partial_y (J \bar{J})}{K^2})\f]
866 : */
867 : template <>
868 1 : struct ComputeBondiIntegrand<Tags::LinearFactor<Tags::BondiH>> {
869 : public:
870 0 : using pre_swsh_derivative_tags =
871 : tmpl::list<Tags::Dy<Tags::BondiJ>, Tags::BondiJ>;
872 0 : using swsh_derivative_tags = tmpl::list<>;
873 0 : using integration_independent_tags = tmpl::list<Tags::OneMinusY>;
874 0 : using temporary_tags =
875 : tmpl::list<::Tags::SpinWeighted<::Tags::TempScalar<0, ComplexDataVector>,
876 : std::integral_constant<int, 2>>>;
877 :
878 0 : using return_tags = tmpl::append<tmpl::list<Tags::LinearFactor<Tags::BondiH>>,
879 : temporary_tags>;
880 0 : using argument_tags =
881 : tmpl::append<pre_swsh_derivative_tags, swsh_derivative_tags,
882 : integration_independent_tags>;
883 :
884 : template <typename... Args>
885 0 : static void apply(
886 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 0>>*>
887 : linear_factor_for_h,
888 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 2>>*>
889 : script_djbar,
890 : const Args&... args) {
891 : apply_impl(make_not_null(&get(*linear_factor_for_h)),
892 : make_not_null(&get(*script_djbar)), get(args)...);
893 : }
894 :
895 : private:
896 0 : static void apply_impl(
897 : gsl::not_null<SpinWeighted<ComplexDataVector, 0>*> linear_factor_for_h,
898 : gsl::not_null<SpinWeighted<ComplexDataVector, 2>*> script_djbar,
899 : const SpinWeighted<ComplexDataVector, 2>& dy_j,
900 : const SpinWeighted<ComplexDataVector, 2>& j,
901 : const SpinWeighted<ComplexDataVector, 0>& one_minus_y);
902 : };
903 :
904 : /*!
905 : * \brief Computes the linear factor which multiplies \f$\bar{H}\f$ in the
906 : * equation which determines the radial (y) dependence of the Bondi quantity
907 : * \f$H\f$.
908 : *
909 : * \details The quantity \f$H \equiv \partial_u J\f$ (evaluated at constant y)
910 : * is defined via the Bondi form of the metric:
911 : * \f[ds^2 = - \left(e^{2 \beta} (1 + r W) - r^2 h_{AB} U^A U^B\right) du^2 - 2
912 : * e^{2 \beta} du dr - 2 r^2 h_{AB} U^B du dx^A + r^2 h_{A B} dx^A dx^B. \f]
913 : * Additional quantities \f$J\f$ and \f$K\f$ are defined using a spherical
914 : * angular dyad \f$q^A\f$:
915 : * \f[ J \equiv h_{A B} q^A q^B, K \equiv h_{A B} q^A \bar{q}^B.\f]
916 : * See \cite Bishop1997ik \cite Handmer2014qha for full details.
917 : *
918 : * We write the equations of motion in the compactified coordinate \f$ y \equiv
919 : * 1 - 2 R/ r\f$, where \f$r(u, \theta, \phi)\f$ is the Bondi radius of the
920 : * \f$y=\f$ constant surface and \f$R(u,\theta,\phi)\f$ is the Bondi radius of
921 : * the worldtube. The equation which determines \f$H\f$ on a surface of constant
922 : * \f$u\f$ given \f$J\f$,\f$\beta\f$, \f$Q\f$, \f$U\f$, and \f$W\f$ on the same
923 : * surface is written as
924 : * \f[(1 - y) \partial_y H + H + (1 - y) J (\mathcal{D}_J H +
925 : * \bar{\mathcal{D}}_J \bar{H}) = A_J + (1 - y) B_J.\f]
926 : * The quantity \f$ (1 - y) J \bar{\mathcal{D}}_J\f$ is the linear factor
927 : * for the non-conjugated \f$H\f$, and is computed from the equation:
928 : * \f[\mathcal{D}_J = \frac{1}{4}(-2 \partial_y \bar{J} + \frac{\bar{J}
929 : * \partial_y (J \bar{J})}{K^2})\f]
930 : */
931 : template <>
932 1 : struct ComputeBondiIntegrand<Tags::LinearFactorForConjugate<Tags::BondiH>> {
933 : public:
934 0 : using pre_swsh_derivative_tags =
935 : tmpl::list<Tags::Dy<Tags::BondiJ>, Tags::BondiJ>;
936 0 : using swsh_derivative_tags = tmpl::list<>;
937 0 : using integration_independent_tags = tmpl::list<Tags::OneMinusY>;
938 0 : using temporary_tags =
939 : tmpl::list<::Tags::SpinWeighted<::Tags::TempScalar<0, ComplexDataVector>,
940 : std::integral_constant<int, 2>>>;
941 :
942 0 : using return_tags =
943 : tmpl::append<tmpl::list<Tags::LinearFactorForConjugate<Tags::BondiH>>,
944 : temporary_tags>;
945 0 : using argument_tags =
946 : tmpl::append<pre_swsh_derivative_tags, swsh_derivative_tags,
947 : integration_independent_tags>;
948 :
949 : template <typename... Args>
950 0 : static void apply(
951 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 4>>*>
952 : linear_factor_for_conjugate_h,
953 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 2>>*>
954 : script_djbar,
955 : const Args&... args) {
956 : apply_impl(make_not_null(&get(*linear_factor_for_conjugate_h)),
957 : make_not_null(&get(*script_djbar)), get(args)...);
958 : }
959 :
960 : private:
961 0 : static void apply_impl(
962 : gsl::not_null<SpinWeighted<ComplexDataVector, 4>*>
963 : linear_factor_for_conjugate_h,
964 : gsl::not_null<SpinWeighted<ComplexDataVector, 2>*> script_djbar,
965 : const SpinWeighted<ComplexDataVector, 2>& dy_j,
966 : const SpinWeighted<ComplexDataVector, 2>& j,
967 : const SpinWeighted<ComplexDataVector, 0>& one_minus_y);
968 : };
969 :
970 : /*!
971 : *\brief Computes the pole part of the integrand (right-hand side) of the
972 : * equation which determines the radial (y) dependence of the scalar quantity
973 : * \f$\Pi\f$.
974 : *
975 : * \details The evolution equation for \f$\Pi\f$ is written as
976 : * \f[(1 - y) \partial_y \Pi + \Pi = A_\Pi + (1 - y) B_\Pi.\f]
977 : * We refer to \f$A_\Pi\f$ as the "pole part" of the integrand and \f$B_\Pi\f$
978 : * as the "regular part". The pole part is computed by this function, and has
979 : * the expression
980 : * \f[A_\Pi = - \Re \left(U \bar{\eth}\psi\right).\f]
981 : */
982 : template <>
983 1 : struct ComputeBondiIntegrand<Tags::PoleOfIntegrand<Tags::KleinGordonPi>> {
984 : public:
985 0 : using pre_swsh_derivative_tags = tmpl::list<>;
986 0 : using swsh_derivative_tags =
987 : tmpl::list<Spectral::Swsh::Tags::Derivative<Tags::KleinGordonPsi,
988 : Spectral::Swsh::Tags::Eth>>;
989 0 : using integration_independent_tags = tmpl::list<Tags::BondiU>;
990 :
991 0 : using return_tags = tmpl::list<Tags::PoleOfIntegrand<Tags::KleinGordonPi>>;
992 0 : using argument_tags =
993 : tmpl::append<pre_swsh_derivative_tags, swsh_derivative_tags,
994 : integration_independent_tags>;
995 :
996 : template <typename... Args>
997 0 : static void apply(
998 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 0>>*>
999 : pole_of_integrand_for_kg_pi,
1000 : const Args&... args) {
1001 : apply_impl(make_not_null(&get(*pole_of_integrand_for_kg_pi)), get(args)...);
1002 : }
1003 :
1004 : private:
1005 0 : static void apply_impl(gsl::not_null<SpinWeighted<ComplexDataVector, 0>*>
1006 : pole_of_integrand_for_kg_pi,
1007 : const SpinWeighted<ComplexDataVector, 1>& eth_kg_psi,
1008 : const SpinWeighted<ComplexDataVector, 1>& bondi_u);
1009 : };
1010 :
1011 : /*!
1012 : * \brief Computes the regular part of the integrand (right-hand side) of the
1013 : * equation which determines the radial (y) dependence of the scalar quantity
1014 : * \f$\Pi\f$.
1015 : *
1016 : * \details The evolution equation for \f$\Pi\f$ is written as
1017 : * \f[(1 - y) \partial_y \Pi + \Pi = A_\Pi + (1 - y) B_\Pi.\f]
1018 : * We refer to \f$A_\Pi\f$ as the "pole part" of the integrand and \f$B_\Pi\f$
1019 : * as the "regular part". The regular part is computed by this function, and has
1020 : * the expression:
1021 : * \f[ B_\Pi = \frac{1}{4R}e^{2\beta}\left(N_{\psi 1}-N_{\psi 2} +N_{\psi
1022 : * 3}\right) -\frac{R}{2}\frac{N_{\psi 4}}{(1-y)^2}
1023 : * +\tau+\frac{\partial_{u}R}{R}(1-y)\partial_y^2\psi, \f]
1024 : * where
1025 : * \f{align*}{
1026 : * & N_{\psi 1}= K(2\Re \eth\beta\bar{\eth}\psi + \eth\bar{\eth}\psi) \\
1027 : * & N_{\psi 2}=\Re \bar{J}\eth\eth\psi + 2\Re \bar{\eth}\beta \bar{\eth}\psi
1028 : * J + \Re \bar{\eth}J\bar{\eth}\psi \\
1029 : * & N_{\psi 3}=\Re \eth K\bar{\eth}\psi \\
1030 : * & N_{\psi 4}=2\Re (\bar{\eth}\psi ) \partial_rU + 2\Re \eth
1031 : * \bar{U}\partial_r\psi + 4\Re \bar{U}\eth\partial_r\psi \\
1032 : * & \tau=\frac{1}{2}(1-y)\partial_y W\partial_y\psi +
1033 : * \frac{(1-y)^2}{4R}\partial_y^2\psi +
1034 : * \frac{1}{2}(1-y)W\partial_y^2\psi + \frac{1}{2}W\partial_y\psi
1035 : * \f}
1036 : */
1037 : template <>
1038 1 : struct ComputeBondiIntegrand<Tags::RegularIntegrand<Tags::KleinGordonPi>> {
1039 : public:
1040 0 : using pre_swsh_derivative_tags =
1041 : tmpl::list<Tags::Dy<Tags::Dy<Tags::KleinGordonPsi>>,
1042 : Tags::Dy<Tags::KleinGordonPsi>, Tags::Dy<Tags::BondiU>,
1043 : Tags::Dy<Tags::BondiW>>;
1044 0 : using swsh_derivative_tags =
1045 : tmpl::list<Spectral::Swsh::Tags::Derivative<
1046 : Tags::Dy<Tags::KleinGordonPsi>, Spectral::Swsh::Tags::Eth>,
1047 : Spectral::Swsh::Tags::Derivative<Tags::KleinGordonPsi,
1048 : Spectral::Swsh::Tags::EthEth>,
1049 : Spectral::Swsh::Tags::Derivative<Tags::KleinGordonPsi,
1050 : Spectral::Swsh::Tags::Eth>,
1051 : Spectral::Swsh::Tags::Derivative<Tags::BondiJ,
1052 : Spectral::Swsh::Tags::Ethbar>,
1053 : Spectral::Swsh::Tags::Derivative<Tags::BondiU,
1054 : Spectral::Swsh::Tags::Ethbar>,
1055 : Spectral::Swsh::Tags::Derivative<Tags::BondiBeta,
1056 : Spectral::Swsh::Tags::Eth>,
1057 : Spectral::Swsh::Tags::Derivative<
1058 : ::Tags::Multiplies<Tags::BondiJ, Tags::BondiJbar>,
1059 : Spectral::Swsh::Tags::Eth>,
1060 : Spectral::Swsh::Tags::Derivative<
1061 : Tags::KleinGordonPsi, Spectral::Swsh::Tags::EthEthbar>>;
1062 0 : using integration_independent_tags =
1063 : tmpl::list<Tags::BondiJ, Tags::Exp2Beta, Tags::DuRDividedByR,
1064 : Tags::OneMinusY, Tags::EthRDividedByR, Tags::BondiR,
1065 : Tags::BondiK, Tags::BondiU, Tags::BondiW>;
1066 :
1067 0 : using return_tags = tmpl::list<Tags::RegularIntegrand<Tags::KleinGordonPi>>;
1068 0 : using argument_tags =
1069 : tmpl::append<pre_swsh_derivative_tags, swsh_derivative_tags,
1070 : integration_independent_tags>;
1071 :
1072 : template <typename... Args>
1073 0 : static void apply(
1074 : const gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 0>>*>
1075 : regular_integrand_for_kg_pi,
1076 : const Args&... args) {
1077 : apply_impl(make_not_null(&get(*regular_integrand_for_kg_pi)), get(args)...);
1078 : }
1079 :
1080 : private:
1081 0 : static void apply_impl(
1082 : gsl::not_null<SpinWeighted<ComplexDataVector, 0>*>
1083 : regular_integrand_for_kg_pi,
1084 : // pre_swsh_derivative_tags
1085 : const SpinWeighted<ComplexDataVector, 0>& dy_dy_kg_psi,
1086 : const SpinWeighted<ComplexDataVector, 0>& dy_kg_psi,
1087 : const SpinWeighted<ComplexDataVector, 1>& dy_bondi_u,
1088 : const SpinWeighted<ComplexDataVector, 0>& dy_w,
1089 : // swsh_derivative_tags
1090 : const SpinWeighted<ComplexDataVector, 1>& eth_dy_kg_psi,
1091 : const SpinWeighted<ComplexDataVector, 2>& eth_eth_kg_psi,
1092 : const SpinWeighted<ComplexDataVector, 1>& eth_kg_psi,
1093 : const SpinWeighted<ComplexDataVector, 1>& ethbar_j,
1094 : const SpinWeighted<ComplexDataVector, 0>& ethbar_u,
1095 : const SpinWeighted<ComplexDataVector, 1>& eth_beta,
1096 : const SpinWeighted<ComplexDataVector, 1>& eth_j_jbar,
1097 : const SpinWeighted<ComplexDataVector, 0>& eth_ethbar_kg_psi,
1098 : // integration_independent_tags
1099 : const SpinWeighted<ComplexDataVector, 2>& j,
1100 : const SpinWeighted<ComplexDataVector, 0>& exp2beta,
1101 : const SpinWeighted<ComplexDataVector, 0>& du_r_divided_by_r,
1102 : const SpinWeighted<ComplexDataVector, 0>& one_minus_y,
1103 : const SpinWeighted<ComplexDataVector, 1>& eth_r_divided_by_r,
1104 : const SpinWeighted<ComplexDataVector, 0>& bondi_r,
1105 : const SpinWeighted<ComplexDataVector, 0>& bondi_k,
1106 : const SpinWeighted<ComplexDataVector, 1>& bondi_u,
1107 : const SpinWeighted<ComplexDataVector, 0>& bondi_w);
1108 : };
1109 : } // namespace Cce
|