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