Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include "DataStructures/DataBox/DataBoxTag.hpp"
7 : #include "DataStructures/Tensor/TypeAliases.hpp"
8 : #include "Evolution/Systems/RelativisticEuler/Valencia/TagsDeclarations.hpp"
9 : #include "NumericalAlgorithms/LinearOperators/PartialDerivatives.hpp"
10 : #include "PointwiseFunctions/GeneralRelativity/TagsDeclarations.hpp"
11 : #include "PointwiseFunctions/Hydro/Tags.hpp"
12 : #include "PointwiseFunctions/Hydro/TagsDeclarations.hpp"
13 : #include "Utilities/TMPL.hpp"
14 :
15 : /// \cond
16 : namespace gsl {
17 : template <typename T>
18 : class not_null;
19 : } // namespace gsl
20 :
21 : class DataVector;
22 : /// \endcond
23 :
24 : namespace RelativisticEuler::Valencia {
25 : /*!
26 : * \brief Compute the time derivative of the conserved variables for the
27 : * Valencia formulation of the relativistic Euler equations.
28 : */
29 : template <size_t Dim>
30 1 : struct TimeDerivativeTerms {
31 0 : struct PressureLapseSqrtDetSpatialMetric : db::SimpleTag {
32 0 : using type = Scalar<DataVector>;
33 : };
34 :
35 0 : struct TildeSUp : db::SimpleTag {
36 0 : using type = tnsr::I<DataVector, Dim, Frame::Inertial>;
37 : };
38 0 : struct DensitizedStress : db::SimpleTag {
39 0 : using type = tnsr::II<DataVector, Dim, Frame::Inertial>;
40 : };
41 :
42 0 : using temporary_tags = tmpl::list<
43 : // Flux terms
44 : PressureLapseSqrtDetSpatialMetric,
45 : hydro::Tags::TransportVelocity<DataVector, Dim, Frame::Inertial>,
46 :
47 : // Source terms
48 : TildeSUp, DensitizedStress,
49 :
50 : // Need lapse, shift, spatial metric, and inverse spatial metric to be
51 : // projected to the boundary for Riemann solvers.
52 : gr::Tags::Lapse<DataVector>, gr::Tags::Shift<DataVector, Dim>,
53 : gr::Tags::SpatialMetric<DataVector, Dim>,
54 : gr::Tags::InverseSpatialMetric<DataVector, Dim>>;
55 :
56 0 : using argument_tags =
57 : tmpl::list<RelativisticEuler::Valencia::Tags::TildeD,
58 : RelativisticEuler::Valencia::Tags::TildeTau,
59 : RelativisticEuler::Valencia::Tags::TildeS<Dim>,
60 :
61 : // For fluxes (and maybe sources)
62 : gr::Tags::Lapse<DataVector>, gr::Tags::Shift<DataVector, Dim>,
63 : gr::Tags::SqrtDetSpatialMetric<DataVector>,
64 : hydro::Tags::Pressure<DataVector>,
65 : hydro::Tags::SpatialVelocity<DataVector, Dim>,
66 :
67 : // For sources
68 : ::Tags::deriv<gr::Tags::Lapse<DataVector>, tmpl::size_t<Dim>,
69 : Frame::Inertial>,
70 : ::Tags::deriv<gr::Tags::Shift<DataVector, Dim>,
71 : tmpl::size_t<Dim>, Frame::Inertial>,
72 : ::Tags::deriv<gr::Tags::SpatialMetric<DataVector, Dim>,
73 : tmpl::size_t<Dim>, Frame::Inertial>,
74 : gr::Tags::InverseSpatialMetric<DataVector, Dim>,
75 : gr::Tags::ExtrinsicCurvature<DataVector, Dim>,
76 :
77 : // For Riemann solvers
78 : gr::Tags::SpatialMetric<DataVector, Dim>>;
79 :
80 0 : static void apply(
81 : gsl::not_null<Scalar<DataVector>*> /*non_flux_terms_dt_tilde_d*/,
82 : gsl::not_null<Scalar<DataVector>*> non_flux_terms_dt_tilde_tau,
83 : gsl::not_null<tnsr::i<DataVector, Dim, Frame::Inertial>*>
84 : non_flux_terms_dt_tilde_s,
85 :
86 : gsl::not_null<tnsr::I<DataVector, Dim, Frame::Inertial>*> tilde_d_flux,
87 : gsl::not_null<tnsr::I<DataVector, Dim, Frame::Inertial>*> tilde_tau_flux,
88 : gsl::not_null<tnsr::Ij<DataVector, Dim, Frame::Inertial>*> tilde_s_flux,
89 :
90 : // For fluxes
91 : gsl::not_null<Scalar<DataVector>*> pressure_lapse_sqrt_det_spatial_metric,
92 : gsl::not_null<tnsr::I<DataVector, Dim, Frame::Inertial>*>
93 : transport_velocity,
94 :
95 : // For sources
96 : gsl::not_null<tnsr::I<DataVector, Dim, Frame::Inertial>*> tilde_s_up,
97 : gsl::not_null<tnsr::II<DataVector, Dim, Frame::Inertial>*>
98 : densitized_stress,
99 :
100 : // For Riemann solvers
101 : gsl::not_null<Scalar<DataVector>*> temp_lapse,
102 : gsl::not_null<tnsr::I<DataVector, Dim, Frame::Inertial>*> temp_shift,
103 : gsl::not_null<tnsr::ii<DataVector, Dim, Frame::Inertial>*>
104 : temp_spatial_metric,
105 : gsl::not_null<tnsr::II<DataVector, Dim, Frame::Inertial>*>
106 : temp_inv_spatial_metric,
107 :
108 : // For fluxes and sources
109 : const Scalar<DataVector>& tilde_d, const Scalar<DataVector>& tilde_tau,
110 : const tnsr::i<DataVector, Dim, Frame::Inertial>& tilde_s,
111 : const Scalar<DataVector>& lapse,
112 : const tnsr::I<DataVector, Dim, Frame::Inertial>& shift,
113 : const Scalar<DataVector>& sqrt_det_spatial_metric,
114 : const Scalar<DataVector>& pressure,
115 : const tnsr::I<DataVector, Dim, Frame::Inertial>& spatial_velocity,
116 :
117 : // For sources
118 : const tnsr::i<DataVector, Dim, Frame::Inertial>& d_lapse,
119 : const tnsr::iJ<DataVector, Dim, Frame::Inertial>& d_shift,
120 : const tnsr::ijj<DataVector, Dim, Frame::Inertial>& d_spatial_metric,
121 : const tnsr::II<DataVector, Dim, Frame::Inertial>& inv_spatial_metric,
122 : const tnsr::ii<DataVector, Dim, Frame::Inertial>& extrinsic_curvature,
123 :
124 : // For Riemann solvers
125 : const tnsr::ii<DataVector, Dim, Frame::Inertial>& spatial_metric);
126 : };
127 : } // namespace RelativisticEuler::Valencia
|