InverseCubic.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include "Evolution/Systems/Cce/Initialize/InverseCubic.hpp"
7 
8 #include <cstddef>
9 #include <memory>
10 #include <string>
11 
12 #include "DataStructures/SpinWeighted.hpp"
14 #include "Evolution/Systems/Cce/Initialize/InitializeJ.hpp"
16 #include "Utilities/Gsl.hpp"
17 #include "Utilities/TMPL.hpp"
18 
19 /// \cond
20 class ComplexDataVector;
21 /// \endcond
22 
23 namespace Cce {
24 namespace InitializeJ {
25 
26 /*!
27  * \brief Initialize \f$J\f$ on the first hypersurface from provided boundary
28  * values of \f$J\f$, \f$R\f$, and \f$\partial_r J\f$.
29  *
30  * \details This initial data is chosen to take the function:
31  *
32  * \f[ J = \frac{A}{r} + \frac{B}{r^3},\f]
33  *
34  * where
35  *
36  * \f{align*}{
37  * A &= R \left( \frac{3}{2} J|_{r = R} + \frac{1}{2} R \partial_r J|_{r =
38  * R}\right) \notag\\
39  * B &= - \frac{1}{2} R^3 (J|_{r = R} + R \partial_r J|_{r = R})
40  * \f}
41  */
43  using options = tmpl::list<>;
44  static constexpr OptionString help = {
45  "Initialization process where J is set to a simple Ansatz with a\n"
46  " A/r + B/r^3 piece such that it is smooth with the Cauchy data at the \n"
47  "worldtube"};
48 
49  WRAPPED_PUPable_decl_template(InverseCubic); // NOLINT
50  explicit InverseCubic(CkMigrateMessage* /*unused*/) noexcept {}
51 
52  InverseCubic() = default;
53 
54  std::unique_ptr<InitializeJ> get_clone() const noexcept override;
55 
56  void operator()(
58  gsl::not_null<tnsr::i<DataVector, 3>*> cartesian_cauchy_coordinates,
61  angular_cauchy_coordinates,
62  const Scalar<SpinWeighted<ComplexDataVector, 2>>& boundary_j,
63  const Scalar<SpinWeighted<ComplexDataVector, 2>>& boundary_dr_j,
64  const Scalar<SpinWeighted<ComplexDataVector, 0>>& r, size_t l_max,
65  size_t number_of_radial_points) const noexcept override;
66 
67  void pup(PUP::er& /*p*/) noexcept override;
68 };
69 } // namespace InitializeJ
70 } // namespace Cce
Cce::InitializeJ::InverseCubic
Initialize on the first hypersurface from provided boundary values of , , and .
Definition: InverseCubic.hpp:42
CharmPupable.hpp
SpinWeighted
Make a spin-weighted type T with spin-weight Spin. Mathematical operators are restricted to addition,...
Definition: SpinWeighted.hpp:24
cstddef
DataVector
Stores a collection of function values.
Definition: DataVector.hpp:42
memory
Frame::Spherical
Represents a spherical-coordinate frame that is associated with a Cartesian frame,...
Definition: IndexType.hpp:54
Cce::InitializeJ::InitializeJ
Abstract base class for an initial hypersurface data generator for Cce.
Definition: InitializeJ.hpp:104
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: BoundaryComputeAndSendToEvolution.hpp:28
Gsl.hpp
TypeAliases.hpp
ComplexDataVector
Stores a collection of complex function values.
Definition: ComplexDataVector.hpp:47
std::unique_ptr
OptionString
const char *const OptionString
The string used in option structs.
Definition: Options.hpp:30
TMPL.hpp
gsl::not_null
Require a pointer to not be a nullptr
Definition: Gsl.hpp:182
string