InitializeCce.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include "DataStructures/SpinWeighted.hpp"
8 #include "Evolution/Systems/Cce/Tags.hpp"
9 #include "Utilities/Gsl.hpp"
10 #include "Utilities/TMPL.hpp"
11 
12 /// \cond
13 class ComplexDataVector;
14 /// \endcond
15 
16 namespace Cce {
17 
18 /*!
19  * \brief Initialize \f$J\f$ on the first hypersurface from provided boundary
20  * values of \f$J\f$, \f$R\f$, and \f$\partial_r J\f$.
21  *
22  * \details This initial data is chosen to take the function:
23  *
24  *\f[ J = \frac{A}{r} + \frac{B}{r^3},
25  *\f]
26  *
27  * where
28  *
29  * \f{align*}{
30  * A &= R \left( \frac{3}{2} J|_{r = R} + \frac{1}{2} R \partial_r J|_{r =
31  * R}\right) \notag\\
32  * B &= - \frac{1}{2} R^3 (J|_{r = R} + R \partial_r J|_{r = R})
33  * \f}
34  */
35 template <template <typename> class BoundaryPrefix>
36 struct InitializeJ {
37  using boundary_tags = tmpl::list<BoundaryPrefix<Tags::BondiJ>,
38  BoundaryPrefix<Tags::Dr<Tags::BondiJ>>,
39  BoundaryPrefix<Tags::BondiR>>;
40 
41  using return_tags = tmpl::list<Tags::BondiJ>;
42  using argument_tags = tmpl::append<boundary_tags>;
43 
44  static void apply(
46  const Scalar<SpinWeighted<ComplexDataVector, 2>>& boundary_j,
47  const Scalar<SpinWeighted<ComplexDataVector, 2>>& boundary_dr_j,
48  const Scalar<SpinWeighted<ComplexDataVector, 0>>& r) noexcept;
49 };
50 } // namespace Cce
Contains functionality for Cauchy Characteristic Extraction.
Definition: BoundaryData.cpp:21
Make a spin-weighted type T with spin-weight Spin. Mathematical operators are restricted to addition...
Definition: SpinWeighted.hpp:25
Initialize on the first hypersurface from provided boundary values of , , and .
Definition: InitializeCce.hpp:36
Stores a collection of complex function values.
Definition: ComplexDataVector.hpp:47
Defines a list of useful type aliases for tensors.
Wraps the template metaprogramming library used (brigand)
Defines functions and classes from the GSL.
Tensor< T, Symmetry<>, index_list<> > Scalar
Scalar type.
Definition: TypeAliases.hpp:21
Require a pointer to not be a nullptr
Definition: Gsl.hpp:182