InternalEnergyDensity.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/DataBox/Tag.hpp"
10 #include "Evolution/Systems/NewtonianEuler/Tags.hpp"
11 #include "PointwiseFunctions/Hydro/EquationsOfState/EquationOfState.hpp"
12 #include "PointwiseFunctions/Hydro/Tags.hpp"
13 #include "Utilities/Gsl.hpp"
14 #include "Utilities/TMPL.hpp"
15 
16 namespace NewtonianEuler {
17 /// @{
18 /*!
19  * Compute the internal energy density, \f$\rho \epsilon\f$,
20  * where \f$\rho\f$ is the mass density, and \f$\epsilon\f$ is the
21  * specific internal energy.
22  */
23 template <typename DataType>
26  const Scalar<DataType>& mass_density,
27  const Scalar<DataType>& specific_internal_energy) noexcept;
28 
29 template <typename DataType>
31  const Scalar<DataType>& mass_density,
32  const Scalar<DataType>& specific_internal_energy) noexcept;
33 /// @}
34 
35 namespace Tags {
36 /// Compute item for the internal energy density, \f$\rho \epsilon\f$.
37 /// \see NewtonianEuler::internal_energy_density
38 ///
39 /// Can be retrieved using `NewtonianEuler::Tags::InternalEnergyDensity`
40 template <typename DataType>
44 
45  using argument_tags =
46  tmpl::list<MassDensity<DataType>, SpecificInternalEnergy<DataType>>;
47 
48  using return_type = Scalar<DataType>;
49 
50  static constexpr auto function =
51  static_cast<void (*)(const gsl::not_null<Scalar<DataType>*>,
52  const Scalar<DataType>&, const Scalar<DataType>&)>(
53  &internal_energy_density<DataType>);
54 };
55 } // namespace Tags
56 } // namespace NewtonianEuler
db::ComputeTag
Mark a struct as a compute tag by inheriting from this.
Definition: Tag.hpp:157
NewtonianEuler::internal_energy_density
void internal_energy_density(gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &mass_density, const Scalar< DataType > &specific_internal_energy) noexcept
NewtonianEuler::Tags::SpecificInternalEnergy
The specific internal energy of the fluid.
Definition: Tags.hpp:60
NewtonianEuler
Items related to evolving the Newtonian Euler system.
Definition: EvolveNewtonianEulerFwd.hpp:8
cstddef
NewtonianEuler::Tags::InternalEnergyDensityCompute
Compute item for the internal energy density, .
Definition: InternalEnergyDensity.hpp:41
Scalar
Tensor< T, Symmetry<>, index_list<> > Scalar
Definition: TypeAliases.hpp:21
Gsl.hpp
Tensor.hpp
NewtonianEuler::Tags::InternalEnergyDensity
The internal energy density.
Definition: Tags.hpp:104
TMPL.hpp
gsl::not_null
Require a pointer to not be a nullptr
Definition: ReadSpecPiecewisePolynomial.hpp:13