Tags.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <string>
7 
11 #include "Evolution/Systems/GeneralizedHarmonic/TagsDeclarations.hpp"
12 #include "PointwiseFunctions/GeneralRelativity/TagsDeclarations.hpp"
13 
14 class DataVector;
15 
16 namespace GeneralizedHarmonic {
17 namespace Tags {
18 /*!
19  * \brief Conjugate momentum to the spacetime metric.
20  *
21  * \details If \f$ \psi_{ab} \f$ is the spacetime metric, and \f$ N \f$ and
22  * \f$ N^i \f$ are the lapse and shift respectively, then we define
23  * \f$ \Pi_{ab} = -\frac{1}{N} ( \partial_t \psi_{ab} + N^{i} \phi_{iab} ) \f$
24  * where \f$\phi_{iab}\f$ is the variable defined by the tag Phi.
25  */
26 template <size_t Dim, typename Frame>
27 struct Pi : db::SimpleTag {
28  using type = tnsr::aa<DataVector, Dim, Frame>;
29  static std::string name() noexcept { return "Pi"; }
30 };
31 
32 /*!
33  * \brief Auxiliary variable which is analytically the spatial derivative of the
34  * spacetime metric
35  * \details If \f$\psi_{ab}\f$ is the spacetime metric then we define
36  * \f$\phi_{iab} = \partial_i \psi_{ab}\f$
37  */
38 template <size_t Dim, typename Frame>
39 struct Phi : db::SimpleTag {
40  using type = tnsr::iaa<DataVector, Dim, Frame>;
41  static std::string name() noexcept { return "Phi"; }
42 };
43 
45  using type = Scalar<DataVector>;
46  static std::string name() noexcept { return "ConstraintGamma0"; }
47 };
49  using type = Scalar<DataVector>;
50  static std::string name() noexcept { return "ConstraintGamma1"; }
51 };
53  using type = Scalar<DataVector>;
54  static std::string name() noexcept { return "ConstraintGamma2"; }
55 };
56 template <size_t Dim, typename Frame>
58  using type = tnsr::a<DataVector, Dim, Frame>;
59  static std::string name() noexcept { return "GaugeH"; }
60 };
61 template <size_t Dim, typename Frame>
63  using type = tnsr::ab<DataVector, Dim, Frame>;
64  static std::string name() noexcept { return "SpacetimeDerivGaugeH"; }
65 };
66 
67 // @{
68 /// \ingroup GeneralizedHarmonicGroup
69 /// \brief Tags corresponding to the characteristic fields of the generalized
70 /// harmonic system.
71 ///
72 /// \details For details on how these are defined and computed, see
73 /// CharacteristicSpeedsCompute
74 template <size_t Dim, typename Frame>
75 struct UPsi : db::SimpleTag {
76  using type = tnsr::aa<DataVector, Dim, Frame>;
77  static std::string name() noexcept { return "UPsi"; }
78 };
79 template <size_t Dim, typename Frame>
80 struct UZero : db::SimpleTag {
81  using type = tnsr::iaa<DataVector, Dim, Frame>;
82  static std::string name() noexcept { return "UZero"; }
83 };
84 template <size_t Dim, typename Frame>
85 struct UPlus : db::SimpleTag {
86  using type = tnsr::aa<DataVector, Dim, Frame>;
87  static std::string name() noexcept { return "UPlus"; }
88 };
89 template <size_t Dim, typename Frame>
91  using type = tnsr::aa<DataVector, Dim, Frame>;
92  static std::string name() noexcept { return "UMinus"; }
93 };
94 // @}
95 
96 template <size_t Dim, typename Frame>
98  using type = Variables<db::wrap_tags_in<
99  ::Tags::CharSpeed, tmpl::list<UPsi<Dim, Frame>, UZero<Dim, Frame>,
101  static std::string name() noexcept { return "CharacteristicSpeeds"; }
102 };
103 
104 template <size_t Dim, typename Frame>
106  using type = Variables<tmpl::list<UPsi<Dim, Frame>, UZero<Dim, Frame>,
108  static std::string name() noexcept { return "CharacteristicFields"; }
109 };
110 
111 template <size_t Dim, typename Frame>
113  using type =
114  Variables<tmpl::list<gr::Tags::SpacetimeMetric<Dim, Frame, DataVector>,
116  static std::string name() noexcept {
117  return "EvolvedFieldsFromCharacteristicFields";
118  }
119 };
120 } // namespace Tags
121 } // namespace GeneralizedHarmonic
Auxiliary variable which is analytically the spatial derivative of the spacetime metric.
Definition: Tags.hpp:39
Conjugate momentum to the spacetime metric.
Definition: Tags.hpp:27
Definition: Tags.hpp:57
Define prefixes for DataBox tags.
Tags for the DataBox inherit from this type.
Definition: DataBoxTag.hpp:65
tmpl::transform< TagList, tmpl::bind< Wrapper, tmpl::_1, tmpl::pin< Args >... > > wrap_tags_in
Create a new list of Tags by wrapping each tag in TagList using the Wrapper.
Definition: DataBoxTag.hpp:418
Definition: Tags.hpp:90
Prefix corresponding to the characteristic speed of the characteristic field given by Tag...
Definition: Prefixes.hpp:109
Definition: Tags.hpp:85
Items related to evolving the first-order generalized harmonic system.
Definition: Characteristics.cpp:25
Definition: Tags.hpp:80
Definition: DataBoxTag.hpp:29
Defines a list of useful type aliases for tensors.
Stores a collection of function values.
Definition: DataVector.hpp:46
Tags corresponding to the characteristic fields of the generalized harmonic system.
Definition: Tags.hpp:75
Defines classes SimpleTag, PrefixTag, ComputeTag and several functions for retrieving tag info...
Tensor< T, Symmetry<>, index_list<> > Scalar
Scalar type.
Definition: TypeAliases.hpp:21