SpecificKineticEnergy.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 specific kinetic energy, \f$v^2/2\f$,
20  * where \f$v\f$ is the magnitude of the velocity.
21  */
22 template <typename DataType, size_t Dim, typename Fr>
25  const tnsr::I<DataType, Dim, Fr>& velocity) noexcept;
26
27 template <typename DataType, size_t Dim, typename Fr>
29  const tnsr::I<DataType, Dim, Fr>& velocity) noexcept;
30 //@}
31
32 namespace Tags {
33 /// Compute item for the specific kinetic energy, \f$v^2/2\f$.
34 /// \see NewtonianEuler::specific_kinetic_energy
35 ///
36 /// Can be retrieved using NewtonianEuler::Tags::SpecificKineticEnergy
37 template <typename DataType, size_t Dim, typename Fr = Frame::Inertial>
41
42  using argument_tags = tmpl::list<Velocity<DataType, Dim, Fr>>;
43
44  using return_type = Scalar<DataType>;
45
46  static constexpr auto function =
47  static_cast<void (*)(const gsl::not_null<Scalar<DataType>*>,
48  const tnsr::I<DataType, Dim, Fr>&)>(
49  &specific_kinetic_energy<DataType, Dim, Fr>);
50 };
51 } // namespace Tags
52 } // namespace NewtonianEuler
db::ComputeTag
Mark a struct as a compute tag by inheriting from this.
Definition: Tag.hpp:157
NewtonianEuler
Items related to evolving the Newtonian Euler system.
Definition: EvolveNewtonianEulerFwd.hpp:8
NewtonianEuler::Tags::SpecificKineticEnergy
The specific kinetic energy.
Definition: Tags.hpp:131
cstddef
NewtonianEuler::Tags::SpecificKineticEnergyCompute
Compute item for the specific kinetic energy, .
Definition: SpecificKineticEnergy.hpp:38
Scalar
Tensor< T, Symmetry<>, index_list<> > Scalar
Definition: TypeAliases.hpp:21
NewtonianEuler::specific_kinetic_energy
void specific_kinetic_energy(gsl::not_null< Scalar< DataType > * > result, const tnsr::I< DataType, Dim, Fr > &velocity) noexcept
Gsl.hpp
Tensor.hpp
TMPL.hpp
gsl::not_null
Require a pointer to not be a nullptr
Definition: ReadSpecThirdOrderPiecewisePolynomial.hpp:13