Line data Source code
1 1 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : /// \file
5 : /// Defines class ScalarWaveSystem.
6 :
7 : #pragma once
8 :
9 : #include <cstddef>
10 :
11 : #include "DataStructures/VariablesTag.hpp"
12 : #include "Evolution/Systems/ScalarWave/BoundaryConditions/BoundaryCondition.hpp"
13 : #include "Evolution/Systems/ScalarWave/Characteristics.hpp"
14 : #include "Evolution/Systems/ScalarWave/Equations.hpp"
15 : #include "Evolution/Systems/ScalarWave/Tags.hpp"
16 : #include "Evolution/Systems/ScalarWave/TimeDerivative.hpp"
17 : #include "Utilities/TMPL.hpp"
18 :
19 : /*!
20 : * \ingroup EvolutionSystemsGroup
21 : * \brief Items related to evolving the scalar wave equation.
22 : *
23 : * The equations of motion for the system augmented with constraint damping
24 : * terms are given by Eq. (15), (23) and (24) of \cite Holst2004wt (setting
25 : * background spacetime to Minkowskian):
26 : *
27 : * \f{align*}
28 : * \partial_t \psi =& -\Pi \\
29 : * \partial_t \Pi =& -\partial^i \Phi_i \\
30 : * \partial_t \Phi_i =& -\partial_i \Pi + \gamma_2 (\partial_i \psi - \Phi_i)
31 : * \f}
32 : *
33 : * In our implementation here, to disable the constraint damping terms,
34 : * set \f$\gamma_2 = 0\f$.
35 : */
36 : namespace ScalarWave {
37 :
38 : template <size_t Dim>
39 0 : struct System {
40 0 : static std::string name() { return "ScalarWave"; }
41 :
42 0 : using boundary_conditions_base = BoundaryConditions::BoundaryCondition<Dim>;
43 :
44 0 : static constexpr bool is_in_flux_conservative_form = false;
45 0 : static constexpr bool has_primitive_and_conservative_vars = false;
46 0 : static constexpr size_t volume_dim = Dim;
47 :
48 0 : using variables_tag =
49 : ::Tags::Variables<tmpl::list<Tags::Psi, Tags::Pi, Tags::Phi<Dim>>>;
50 0 : using flux_variables = tmpl::list<>;
51 0 : using gradient_variables = tmpl::list<Tags::Psi, Tags::Pi, Tags::Phi<Dim>>;
52 :
53 0 : using compute_volume_time_derivative_terms = TimeDerivative<Dim>;
54 :
55 0 : using compute_largest_characteristic_speed =
56 : Tags::ComputeLargestCharacteristicSpeed;
57 : };
58 : } // namespace ScalarWave
|