Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include "Evolution/Systems/Cce/OptionTags.hpp"
7 : #include "Evolution/Systems/Cce/Tags.hpp"
8 : #include "Utilities/Gsl.hpp"
9 : #include "Utilities/TMPL.hpp"
10 :
11 : namespace Cce {
12 :
13 : /*!
14 : * \brief Computes `Tags::KleinGordonSource<Tag>` for the tags evolved by
15 : * Klein-Gordon Cce.
16 : *
17 : * \details In scalar-tensor theory, the Cce hypersurface equations get
18 : * additional source terms contributed by the stress-energy tensor of the scalar
19 : * field. The tag `Tags::KleinGordonSource<Tag>` stores the corresponding volume
20 : * data.
21 : */
22 : template <typename Tag>
23 1 : struct ComputeKleinGordonSource;
24 :
25 : /*!
26 : * \brief Computes the Klein-Gordon source of the Bondi \f$\beta\f$
27 : *
28 : * \details The source reads:
29 : *
30 : * \f{align*}{
31 : * 2 \pi (1-y) (\partial_y\psi)^2,
32 : * \f}
33 : * where \f$\psi\f$ is the Klein-Gordon (scalar) field.
34 : */
35 : template <>
36 1 : struct ComputeKleinGordonSource<Tags::BondiBeta> {
37 0 : using return_tags = tmpl::list<Tags::KleinGordonSource<Tags::BondiBeta>>;
38 0 : using argument_tags =
39 : tmpl::list<Tags::Dy<Tags::KleinGordonPsi>, Tags::OneMinusY>;
40 0 : static void apply(
41 : gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 0>>*> kg_source_beta,
42 : const Scalar<SpinWeighted<ComplexDataVector, 0>>& dy_kg_psi,
43 : const Scalar<SpinWeighted<ComplexDataVector, 0>>& one_minus_y);
44 : };
45 :
46 : /*!
47 : * \brief Computes the Klein-Gordon source of the Bondi \f$Q\f$
48 : *
49 : * \details Following the nomenclature of \cite Moxon2020gha and their Eq. (49),
50 : * the scalar field contributes only to the regular part of the source term
51 : * \f$S_2^R\f$. The expression reads:
52 : *
53 : * \f{align*}{
54 : * 16 \pi \eth\psi \partial_y\psi,
55 : * \f}
56 : * where \f$\psi\f$ is the Klein-Gordon (scalar) field.
57 : */
58 : template <>
59 1 : struct ComputeKleinGordonSource<Tags::BondiQ> {
60 0 : using return_tags = tmpl::list<Tags::KleinGordonSource<Tags::BondiQ>>;
61 0 : using argument_tags =
62 : tmpl::list<Tags::Dy<Tags::KleinGordonPsi>,
63 : Spectral::Swsh::Tags::Derivative<Tags::KleinGordonPsi,
64 : Spectral::Swsh::Tags::Eth>>;
65 0 : static void apply(
66 : gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 1>>*> kg_source_q,
67 : const Scalar<SpinWeighted<ComplexDataVector, 0>>& dy_kg_psi,
68 : const Scalar<SpinWeighted<ComplexDataVector, 1>>& eth_kg_psi);
69 : };
70 :
71 : /*!
72 : * \brief Computes the Klein-Gordon source of the Bondi \f$U\f$
73 : *
74 : * \details The source vanishes.
75 : */
76 : template <>
77 1 : struct ComputeKleinGordonSource<Tags::BondiU> {
78 0 : using return_tags = tmpl::list<Tags::KleinGordonSource<Tags::BondiU>>;
79 0 : using argument_tags = tmpl::list<Tags::LMax, Tags::NumberOfRadialPoints>;
80 0 : static void apply(
81 : gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 1>>*> kg_source_u,
82 : size_t l_max, size_t number_of_radial_points);
83 : };
84 :
85 : /*!
86 : * \brief Computes the Klein-Gordon source of the Bondi \f$W\f$
87 : *
88 : * \details Following the nomenclature of \cite Moxon2020gha and their Eq. (49),
89 : * the scalar field contributes only to the regular part of the source term
90 : * \f$S_2^R\f$. The expression reads:
91 : *
92 : * \f{align*}{
93 : * \frac{\pi e^{2\beta}}{R} \left[J(\bar{\eth}\psi)^2 + \bar{J}(\eth
94 : * \psi)^2-2K \eth\psi\bar{\eth}\psi\right],
95 : * \f}
96 : * where \f$\psi\f$ is the Klein-Gordon (scalar) field.
97 : */
98 : template <>
99 1 : struct ComputeKleinGordonSource<Tags::BondiW> {
100 0 : using return_tags = tmpl::list<Tags::KleinGordonSource<Tags::BondiW>>;
101 0 : using argument_tags =
102 : tmpl::list<Tags::Exp2Beta, Tags::BondiR, Tags::BondiK, Tags::BondiJ,
103 : Spectral::Swsh::Tags::Derivative<Tags::KleinGordonPsi,
104 : Spectral::Swsh::Tags::Eth>>;
105 0 : static void apply(
106 : gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 0>>*> kg_source_w,
107 : const Scalar<SpinWeighted<ComplexDataVector, 0>>& exp_2_beta,
108 : const Scalar<SpinWeighted<ComplexDataVector, 0>>& bondi_r,
109 : const Scalar<SpinWeighted<ComplexDataVector, 0>>& bondi_k,
110 : const Scalar<SpinWeighted<ComplexDataVector, 2>>& bondi_j,
111 : const Scalar<SpinWeighted<ComplexDataVector, 1>>& eth_kg_psi);
112 : };
113 :
114 : /*!
115 : * \brief Computes the Klein-Gordon source of the Bondi \f$H\f$
116 : *
117 : * \details Following the nomenclature of \cite Moxon2020gha and their Eq. (50),
118 : * the scalar field contributes only to the regular part of the source term
119 : * \f$S_3^R\f$. The expression reads:
120 : *
121 : * \f{align*}{
122 : * 2 \pi \frac{e^{2\beta}}{R}(\eth\psi)^2,
123 : * \f}
124 : * where \f$\psi\f$ is the Klein-Gordon (scalar) field.
125 : */
126 : template <>
127 1 : struct ComputeKleinGordonSource<Tags::BondiH> {
128 0 : using return_tags = tmpl::list<Tags::KleinGordonSource<Tags::BondiH>>;
129 0 : using argument_tags =
130 : tmpl::list<Tags::Exp2Beta, Tags::BondiR,
131 : Spectral::Swsh::Tags::Derivative<Tags::KleinGordonPsi,
132 : Spectral::Swsh::Tags::Eth>>;
133 0 : static void apply(
134 : gsl::not_null<Scalar<SpinWeighted<ComplexDataVector, 2>>*> kg_source_h,
135 : const Scalar<SpinWeighted<ComplexDataVector, 0>>& exp_2_beta,
136 : const Scalar<SpinWeighted<ComplexDataVector, 0>>& bondi_r,
137 : const Scalar<SpinWeighted<ComplexDataVector, 1>>& eth_kg_psi);
138 : };
139 : } // namespace Cce
|