System.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 
8 #include "DataStructures/Tensor/EagerMath/Magnitude.hpp"
10 #include "Evolution/Conservative/ConservativeDuDt.hpp"
11 #include "Evolution/Systems/GrMhd/ValenciaDivClean/Characteristics.hpp"
12 #include "Evolution/Systems/GrMhd/ValenciaDivClean/ConservativeFromPrimitive.hpp"
13 #include "Evolution/Systems/GrMhd/ValenciaDivClean/Fluxes.hpp"
14 #include "Evolution/Systems/GrMhd/ValenciaDivClean/NewmanHamlin.hpp"
15 #include "Evolution/Systems/GrMhd/ValenciaDivClean/PrimitiveFromConservative.hpp"
16 #include "Evolution/Systems/GrMhd/ValenciaDivClean/Sources.hpp"
17 #include "Evolution/Systems/GrMhd/ValenciaDivClean/Tags.hpp"
18 #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
19 #include "PointwiseFunctions/Hydro/Tags.hpp"
20 #include "Utilities/TMPL.hpp"
21 
22 namespace Tags {
23 template <class>
24 class Variables;
25 } // namespace Tags
26 
27 /// \ingroup EvolutionSystemsGroup
28 /// \brief Items related to general relativistic magnetohydrodynamics (GRMHD)
29 namespace grmhd {
30 /// The Valencia formulation of ideal GRMHD with divergence cleaning.
31 ///
32 /// References:
33 /// - [Numerical 3+1 General Relativistic Magnetohydrodynamics: A Local
34 /// Characteristic Approach](http://iopscience.iop.org/article/10.1086/498238)
35 /// - [GRHydro: a new open-source general-relativistic magnetohydrodynamics code
36 /// for the Einstein toolkit]
37 /// (http://iopscience.iop.org/article/10.1088/0264-9381/31/1/015005)
38 namespace ValenciaDivClean {
39 
40 template <typename EquationOfStateType>
41 struct System {
42  static constexpr bool is_in_flux_conservative_form = true;
43  static constexpr bool has_primitive_and_conservative_vars = true;
44  static constexpr size_t volume_dim = 3;
45  static constexpr size_t thermodynamic_dim =
46  EquationOfStateType::thermodynamic_dim;
47 
50 
51  using variables_tag =
54 
55  using spacetime_variables_tag = ::Tags::Variables<tmpl::list<
61  ::Tags::deriv<gr::Tags::Lapse<DataVector>, tmpl::size_t<3>,
63  ::Tags::deriv<gr::Tags::Shift<3, Frame::Inertial, DataVector>,
64  tmpl::size_t<3>, Frame::Inertial>,
65  ::Tags::deriv<gr::Tags::SpatialMetric<3, Frame::Inertial, DataVector>,
66  tmpl::size_t<3>, Frame::Inertial>,
68 
69  template <typename Tag>
71  Tag, gr::Tags::InverseSpatialMetric<3, Frame::Inertial, DataVector>>;
72 
73  using char_speeds_tag =
77 
79 
80  template <typename OrderedListOfPrimitiveRecoverySchemes>
82  PrimitiveFromConservative<OrderedListOfPrimitiveRecoverySchemes,
83  EquationOfStateType::thermodynamic_dim>;
84 
86 
88 
90 
91  // skip TildeD as its source is zero.
92  using sourced_variables = tmpl::list<Tags::TildeTau, Tags::TildeS<>,
93  Tags::TildeB<>, Tags::TildePhi>;
94 };
95 } // namespace ValenciaDivClean
96 } // namespace grmhd
Definition: Variables.hpp:46
Definition: Tags.hpp:36
The densitized divergence-cleaning field .
Definition: Tags.hpp:70
Definition: Tags.hpp:46
Definition: Tags.hpp:31
Compute the conservative variables from primitive variables.
Definition: ConservativeFromPrimitive.hpp:61
Calculate for a conservative system.
Definition: ConservativeDuDt.hpp:26
The fluxes of the conservative variables.
Definition: Fluxes.hpp:58
The densitized magnetic field .
Definition: Tags.hpp:64
Definition: Tags.hpp:26
Defines class Variables.
Definition: Tags.hpp:41
Definition: DataBoxTag.hpp:29
Compute the characteristic speeds for the Valencia formulation of GRMHD with divergence cleaning...
Definition: Characteristics.hpp:131
Wraps the template metaprogramming library used (brigand)
Compute the source terms for the flux-conservative Valencia formulation of GRMHD with divergence clea...
Definition: Sources.hpp:84
The magnitude of a (co)vector with respect to a specific metric.
Definition: Magnitude.hpp:80
Definition: IndexType.hpp:44
Compute the primitive variables from the conservative variables.
Definition: PrimitiveFromConservative.hpp:46
Definition: System.hpp:41
Items related to general relativistic magnetohydrodynamics (GRMHD)
Definition: Characteristics.hpp:34
Definition: Tags.hpp:96