Tags.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
7 #include "DataStructures/SpinWeighted.hpp"
10 #include "NumericalAlgorithms/Spectral/SwshTags.hpp"
11 
12 namespace Cce {
13 
14 /// Tags for Cauchy Characteristic Extraction routines
15 namespace Tags {
16 
17 // Bondi parameter tags
18 
19 /// Bondi parameter \f$\beta\f$
22  static std::string name() noexcept { return "BondiBeta"; }
23 };
24 
25 /// \brief Bondi parameter \f$H = \partial_u J\f$.
26 /// \note The notation in the literature is not consistent regarding this
27 /// quantity, or whether it is denoted by an \f$H\f$ at all. The SpECTRE CCE
28 /// module consistently uses it to describe the (retarded) partial time
29 /// derivative of \f$J\f$ at fixed compactified radius \f$y\f$ (to be contrasted
30 /// with the physical Bondi radius, which is not directly used for numerical
31 /// grids).
34  static std::string name() noexcept { return "H"; }
35 };
36 
37 /// Bondi parameter \f$J\f$
40  static std::string name() noexcept { return "J"; }
41 };
42 
43 /// Bondi parameter \f$\bar{J}\f$
45  using type = Scalar<SpinWeighted<ComplexDataVector, -2>>;
46  static std::string name() noexcept { return "Jbar"; }
47 };
48 
49 /// Bondi parameter \f$K = \sqrt{1 + J \bar{J}}\f$
52  static std::string name() noexcept { return "K"; }
53 };
54 
55 /// Bondi parameter \f$Q\f$
58  static std::string name() noexcept { return "Q"; }
59 };
60 
61 /// Bondi parameter \f$\bar{Q}\f$
63  using type = Scalar<SpinWeighted<ComplexDataVector, -1>>;
64  static std::string name() noexcept { return "Qbar"; }
65 };
66 
67 /// Bondi parameter \f$U\f$
70  static std::string name() noexcept { return "U"; }
71 };
72 
73 /// Bondi parameter \f$\bar{U}\f$
75  using type = Scalar<SpinWeighted<ComplexDataVector, -1>>;
76  static std::string name() noexcept { return "Ubar"; }
77 };
78 
79 /// Bondi parameter \f$W\f$
82  static std::string name() noexcept { return "W"; }
83 };
84 
85 /// The derivative with respect to the numerical coordinate \f$y = 1 - 2R/r\f$,
86 /// where \f$R(u, \theta, \phi)\f$ is Bondi radius of the worldtube.
87 template <typename Tag>
90  using tag = Tag;
91  static const size_t dimension_to_differentiate = 2;
92  static std::string name() noexcept { return "Dy(" + Tag::name() + ")"; }
93 };
94 
95 /// The derivative with respect to Bondi \f$r\f$
96 template <typename Tag>
99  using tag = Tag;
100  static std::string name() noexcept { return "Dr(" + Tag::name() + ")"; }
101 };
102 
103 // prefix tags associated with the integrands which are used as input to solvers
104 // for the CCE equations
105 
106 /// A prefix tag representing a quantity that will appear on the right-hand side
107 /// of an explicitly regular differential equation
108 template <typename Tag>
111  using tag = Tag;
112  static std::string name() noexcept {
113  return "Integrand(" + Tag::name() + ")";
114  }
115 };
116 
117 /// A prefix tag representing the boundary data for a quantity on the extraction
118 /// surface.
119 template <typename Tag>
122  using tag = Tag;
123  static std::string name() noexcept {
124  return "BoundaryValue(" + Tag::name() + ")";
125  }
126 };
127 
128 /// A prefix tag representing the coefficient of a pole part of the right-hand
129 /// side of a singular differential equation
130 template <typename Tag>
133  using tag = Tag;
134  static std::string name() noexcept {
135  return "PoleOfIntegrand(" + Tag::name() + ")";
136  }
137 };
138 
139 /// A prefix tag representing the regular part of the right-hand side of a
140 /// regular differential equation
141 template <typename Tag>
144  using tag = Tag;
145  static std::string name() noexcept {
146  return "RegularIntegrand(" + Tag::name() + ")";
147  }
148 };
149 
150 /// A prefix tag representing a linear factor that acts on `Tag`. To determine
151 /// the spin weight, It is assumed that the linear factor plays the role of
152 /// \f$L\f$ in an equation of the form,
153 /// \f$ (y - 1) \partial_y H + L H + L^\prime \bar{H} = A + (1 - y) B \f$
154 template <typename Tag>
157  using tag = Tag;
158  static std::string name() noexcept {
159  return "LinearFactor(" + Tag::name() + ")";
160  }
161 };
162 
163 /// A prefix tag representing a linear factor that acts on `Tag`. To determine
164 /// the spin weight, it is assumed that the linear factor plays the role of
165 /// \f$L^\prime\f$ in an equation of the form,
166 /// \f$ (y - 1) \partial_y H + L H + L^\prime \bar{H} = A + (1 - y) B \f$
167 template <typename Tag>
169  using type =
171  using tag = Tag;
172  static std::string name() noexcept {
173  return "LinearFactorForConjugate(" + Tag::name() + ")";
174  }
175 };
176 
177 // Below are additional tags for values which are frequently used in CCE
178 // calculations, and therefore worth caching
179 
180 /// Coordinate value \f$(1 - y)\f$, which will be cached and sent to the
181 /// implementing functions
184  static std::string name() noexcept { return "OneMinusY"; }
185 };
186 
187 /// A tag for the first time derivative of the worldtube parameter
188 /// \f$\partial_u R\f$, where \f$R(u, \theta, \phi)\f$ is Bondi
189 /// radius of the worldtube.
190 struct DuR : db::SimpleTag {
192  static std::string name() noexcept { return "DuR"; }
193 };
194 
195 /// The value \f$\partial_u R / R\f$, where \f$R(u, \theta, \phi)\f$ is Bondi
196 /// radius of the worldtube.
199  static std::string name() noexcept { return "DuRDividedByR"; }
200 };
201 
202 /// The value \f$\eth R / R\f$, where \f$R(u, \theta, \phi)\f$ is Bondi
203 /// radius of the worldtube.
207  static constexpr int spin = 1;
208  static std::string name() noexcept { return "EthRDividedByR"; }
209 };
210 
211 /// The value \f$\eth \eth R / R\f$, where \f$R(u, \theta, \phi)\f$ is Bondi
212 /// radius of the worldtube.
216  static constexpr int spin = 2;
217  static std::string name() noexcept { return "EthEthRDividedByR"; }
218 };
219 
220 /// The value \f$\eth \bar{\eth} R / R\f$, where \f$R(u, \theta, \phi)\f$ is
221 /// Bondi radius of the worldtube.
225  static constexpr int spin = 0;
226  static std::string name() noexcept { return "EthEthbarRDividedByR"; }
227 };
228 
229 /// The value \f$\exp(2\beta)\f$.
232  static std::string name() noexcept { return "Exp2Beta"; }
233 };
234 
235 /// The value \f$ \bar{J} (Q - 2 \eth \beta ) \f$.
237  using type = Scalar<SpinWeighted<ComplexDataVector, -1>>;
238  static std::string name() noexcept { return "JbarQMinus2EthBeta"; }
239 };
240 
241 /// The Bondi radius \f$R(u, \theta, \phi)\f$ is of the worldtube.
244  static std::string name() noexcept { return "R"; }
245 };
246 } // namespace Tags
247 } // namespace Cce
Bondi parameter .
Definition: Tags.hpp:44
Bondi parameter .
Definition: Tags.hpp:56
Contains functionality for Cauchy Characteristic Extraction.
Definition: Equations.cpp:25
The value , where is Bondi radius of the worldtube.
Definition: Tags.hpp:222
Bondi parameter .
Definition: Tags.hpp:20
The derivative with respect to Bondi .
Definition: Tags.hpp:97
A prefix tag representing a quantity that will appear on the right-hand side of an explicitly regular...
Definition: Tags.hpp:109
The value .
Definition: Tags.hpp:236
Bondi parameter .
Definition: Tags.hpp:38
Tags for the DataBox inherit from this type.
Definition: DataBoxTag.hpp:64
The Bondi radius is of the worldtube.
Definition: Tags.hpp:242
A prefix tag representing the regular part of the right-hand side of a regular differential equation...
Definition: Tags.hpp:142
Coordinate value , which will be cached and sent to the implementing functions.
Definition: Tags.hpp:182
A prefix tag representing a linear factor that acts on Tag. To determine the spin weight...
Definition: Tags.hpp:155
The value , where is Bondi radius of the worldtube.
Definition: Tags.hpp:197
Make a spin-weighted type T with spin-weight Spin. Mathematical operators are restricted to addition...
Definition: SpinWeighted.hpp:25
Bondi parameter .
Definition: Tags.hpp:68
Bondi parameter .
Definition: Tags.hpp:74
The value , where is Bondi radius of the worldtube.
Definition: Tags.hpp:204
The value , where is Bondi radius of the worldtube.
Definition: Tags.hpp:213
A tag for the first time derivative of the worldtube parameter , where is Bondi radius of the worldt...
Definition: Tags.hpp:190
Stores a collection of complex function values.
Definition: ComplexDataVector.hpp:47
The value .
Definition: Tags.hpp:230
A prefix tag representing the coefficient of a pole part of the right-hand side of a singular differe...
Definition: Tags.hpp:131
Bondi parameter .
Definition: Tags.hpp:62
Definition: DataBoxTag.hpp:29
The derivative with respect to the numerical coordinate , where is Bondi radius of the worldtube...
Definition: Tags.hpp:88
Defines classes for Tensor.
Defines a list of useful type aliases for tensors.
Struct for labeling the spin-weighted derivative in tags.
Definition: SwshTags.hpp:25
Bondi parameter .
Definition: Tags.hpp:32
Struct for labeling the spin-weighted derivative in tags.
Definition: SwshTags.hpp:32
Marks an item as being a prefix to another tag.
Definition: DataBoxTag.hpp:111
A prefix tag representing a linear factor that acts on Tag. To determine the spin weight...
Definition: Tags.hpp:168
Struct for labeling the spin-weighted derivative in tags.
Definition: SwshTags.hpp:40
Defines classes SimpleTag, PrefixTag, ComputeTag and several functions for retrieving tag info...
A prefix tag representing the boundary data for a quantity on the extraction surface.
Definition: Tags.hpp:120
Tensor< T, Symmetry<>, index_list<> > Scalar
Scalar type.
Definition: TypeAliases.hpp:21
Bondi parameter .
Definition: Tags.hpp:80
Bondi parameter .
Definition: Tags.hpp:50