Fluxes.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/TypeAliases.hpp" // IWYU pragma: keep
9 
10 /// \cond
11 namespace gsl {
12 template <typename T>
13 class not_null;
14 } // namespace gsl
15 
16 class DataVector;
17 /// \endcond
18 
19 // IWYU pragma: no_forward_declare Tensor
20 
21 namespace RelativisticEuler {
22 namespace Valencia {
23 
24 /*!
25  * \brief The fluxes of the conservative variables
26  *
27  * \f{align*}
28  * F^i({\tilde D}) = &~ {\tilde D} v^i_{tr} \\
29  * F^i({\tilde S}_j) = &~ {\tilde S}_j v^i_{tr} + \sqrt{\gamma} \alpha p
30  * \delta^i_j \\
31  * F^i({\tilde \tau}) = &~ {\tilde \tau} v^i_{tr} + \sqrt{\gamma} \alpha p v^i
32  * \f}
33  * where the conservative variables \f${\tilde D}\f$, \f${\tilde S}_i\f$, and
34  * \f${\tilde \tau}\f$ are a generalized mass-energy density, momentum density,
35  * and specific internal energy density as measured by an Eulerian observer,
36  * \f$v^i_{tr} = \alpha v^i - \beta^i\f$ is the transport velocity, \f$\alpha\f$
37  * is the lapse, \f$\beta^i\f$ is the shift, \f$v^i\f$ is the spatial velocity,
38  * \f$\gamma\f$ is the determinant of the spatial metric, and \f$p\f$ is the
39  * pressure.
40  */
41 template <size_t Dim>
42 void fluxes(
43  gsl::not_null<tnsr::I<DataVector, Dim, Frame::Inertial>*> tilde_d_flux,
44  gsl::not_null<tnsr::I<DataVector, Dim, Frame::Inertial>*> tilde_tau_flux,
45  gsl::not_null<tnsr::Ij<DataVector, Dim, Frame::Inertial>*> tilde_s_flux,
46  const Scalar<DataVector>& tilde_d, const Scalar<DataVector>& tilde_tau,
47  const tnsr::i<DataVector, Dim, Frame::Inertial>& tilde_s,
49  const tnsr::I<DataVector, Dim, Frame::Inertial>& shift,
50  const Scalar<DataVector>& sqrt_det_spatial_metric,
51  const Scalar<DataVector>& pressure,
52  const tnsr::I<DataVector, Dim, Frame::Inertial>& spatial_velocity) noexcept;
53 } // namespace Valencia
54 } // namespace RelativisticEuler
Implementations from the Guideline Support Library.
Definition: ConservativeFromPrimitive.hpp:10
Items related to evolving the relativistic Euler system.
Definition: Characteristics.hpp:21
Scalar< DataType > lapse(const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric) noexcept
Compute lapse from shift and spacetime metric.
Definition: ComputeSpacetimeQuantities.cpp:98
Defines a list of useful type aliases for tensors.
tnsr::I< DataType, SpatialDim, Frame > shift(const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) noexcept
Compute shift from spacetime metric and inverse spatial metric.
Definition: ComputeSpacetimeQuantities.cpp:82
Stores a collection of function values.
Definition: DataVector.hpp:46
void fluxes(gsl::not_null< tnsr::I< DataVector, Dim, Frame::Inertial > *> tilde_d_flux, gsl::not_null< tnsr::I< DataVector, Dim, Frame::Inertial > *> tilde_tau_flux, gsl::not_null< tnsr::Ij< DataVector, Dim, Frame::Inertial > *> tilde_s_flux, const Scalar< DataVector > &tilde_d, const Scalar< DataVector > &tilde_tau, const tnsr::i< DataVector, Dim, Frame::Inertial > &tilde_s, const Scalar< DataVector > &lapse, const tnsr::I< DataVector, Dim, Frame::Inertial > &shift, const Scalar< DataVector > &sqrt_det_spatial_metric, const Scalar< DataVector > &pressure, const tnsr::I< DataVector, Dim, Frame::Inertial > &spatial_velocity) noexcept
The fluxes of the conservative variables.
Tensor< T, Symmetry<>, index_list<> > Scalar
Scalar type.
Definition: TypeAliases.hpp:21
Require a pointer to not be a nullptr
Definition: ConservativeFromPrimitive.hpp:12