Line data Source code
1 1 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : /// \file
5 : /// Defines DataBox tags for scalar wave system
6 :
7 : #pragma once
8 :
9 : #include <cstddef>
10 : #include <string>
11 :
12 : #include "DataStructures/DataBox/Prefixes.hpp"
13 : #include "DataStructures/DataBox/Tag.hpp"
14 : #include "DataStructures/Tensor/TypeAliases.hpp"
15 : #include "Evolution/Systems/ScalarWave/TagsDeclarations.hpp"
16 :
17 : class DataVector;
18 :
19 : namespace ScalarWave::Tags {
20 : /*!
21 : * \brief The scalar field.
22 : */
23 1 : struct Psi : db::SimpleTag {
24 0 : using type = Scalar<DataVector>;
25 : };
26 :
27 : /*!
28 : * \brief Auxiliary variable which is analytically the negative time derivative
29 : * of the scalar field.
30 : * \details If \f$\Psi\f$ is the scalar field then we define
31 : * \f$\Pi = -\partial_t \Psi\f$
32 : */
33 1 : struct Pi : db::SimpleTag {
34 0 : using type = Scalar<DataVector>;
35 : };
36 :
37 : /*!
38 : * \brief Auxiliary variable which is analytically the spatial derivative of the
39 : * scalar field.
40 : * \details If \f$\Psi\f$ is the scalar field then we define
41 : * \f$\Phi_{i} = \partial_i \Psi\f$
42 : */
43 : template <size_t Dim, typename Frame>
44 1 : struct Phi : db::SimpleTag {
45 0 : using type = tnsr::i<DataVector, Dim, Frame>;
46 : };
47 :
48 0 : struct ConstraintGamma2 : db::SimpleTag {
49 0 : using type = Scalar<DataVector>;
50 : };
51 :
52 : /*!
53 : * \brief Tag for the one-index constraint of the ScalarWave system
54 : *
55 : * For details on how this is defined and computed, see
56 : * `OneIndexConstraintCompute`.
57 : */
58 : template <size_t Dim>
59 1 : struct OneIndexConstraint : db::SimpleTag {
60 0 : using type = tnsr::i<DataVector, Dim, Frame::Inertial>;
61 : };
62 : /*!
63 : * \brief Tag for the two-index constraint of the ScalarWave system
64 : *
65 : * For details on how this is defined and computed, see
66 : * `TwoIndexConstraintCompute`.
67 : */
68 : template <size_t Dim>
69 1 : struct TwoIndexConstraint : db::SimpleTag {
70 0 : using type = tnsr::ij<DataVector, Dim, Frame::Inertial>;
71 : };
72 :
73 : /// @{
74 : /// \brief Tags corresponding to the characteristic fields of the flat-spacetime
75 : /// scalar-wave system.
76 : ///
77 : /// \details For details on how these are defined and computed, \see
78 : /// CharacteristicSpeedsCompute
79 1 : struct VPsi : db::SimpleTag {
80 0 : using type = Scalar<DataVector>;
81 : };
82 : template <size_t Dim>
83 0 : struct VZero : db::SimpleTag {
84 0 : using type = tnsr::i<DataVector, Dim, Frame::Inertial>;
85 : };
86 0 : struct VPlus : db::SimpleTag {
87 0 : using type = Scalar<DataVector>;
88 : };
89 0 : struct VMinus : db::SimpleTag {
90 0 : using type = Scalar<DataVector>;
91 : };
92 : /// @}
93 :
94 : template <size_t Dim>
95 0 : struct CharacteristicSpeeds : db::SimpleTag {
96 0 : using type = std::array<DataVector, 4>;
97 : };
98 :
99 : template <size_t Dim>
100 0 : struct CharacteristicFields : db::SimpleTag {
101 0 : using type = Variables<tmpl::list<VPsi, VZero<Dim>, VPlus, VMinus>>;
102 : };
103 :
104 : template <size_t Dim>
105 0 : struct EvolvedFieldsFromCharacteristicFields : db::SimpleTag {
106 0 : using type = Variables<tmpl::list<Psi, Pi, Phi<Dim>>>;
107 : };
108 :
109 : /// The energy density of the scalar wave
110 : template <size_t Dim>
111 1 : struct EnergyDensity : db::SimpleTag {
112 0 : using type = Scalar<DataVector>;
113 : };
114 :
115 : /// The momentum density of the scalar wave
116 : template <size_t Dim>
117 1 : struct MomentumDensity : db::SimpleTag {
118 0 : using type = tnsr::i<DataVector, Dim, Frame::Inertial>;
119 : };
120 :
121 : } // namespace ScalarWave::Tags
|