LorentzFactor.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 
10 #include "PointwiseFunctions/Hydro/Tags.hpp" // IWYU pragma: keep
11 #include "Utilities/TMPL.hpp"
12 
13 namespace hydro {
14 // @{
15 /// Computes the Lorentz factor \f$W=1/\sqrt{1 - v^i v_i}\f$
16 template <typename DataType, size_t Dim, typename Fr>
18  const tnsr::I<DataType, Dim, Fr>& spatial_velocity,
19  const tnsr::i<DataType, Dim, Fr>& spatial_velocity_form) noexcept;
20 
21 template <typename DataType>
23  const Scalar<DataType>& spatial_velocity_squared) noexcept;
24 // @}
25 
26 namespace Tags {
27 /// Compute item for Lorentz factor \f$W\f$.
28 ///
29 /// Can be retrieved using `hydro::Tags::LorentzFactor`
30 template <typename DataType, size_t Dim, typename Fr>
32  static constexpr auto function = &lorentz_factor<DataType, Dim, Fr>;
33  using argument_tags = tmpl::list<SpatialVelocity<DataType, Dim, Fr>,
35 };
36 } // namespace Tags
37 } // namespace hydro
Compute item for Lorentz factor .
Definition: LorentzFactor.hpp:31
Scalar< DataType > lorentz_factor(const tnsr::I< DataType, Dim, Fr > &spatial_velocity, const tnsr::i< DataType, Dim, Fr > &spatial_velocity_form) noexcept
Computes the Lorentz factor .
Marks a DataBoxTag as being a compute item that executes a function.
Definition: DataBoxTag.hpp:155
The spatial velocity one-form .
Definition: Tags.hpp:153
The Lorentz factor .
Definition: Tags.hpp:64
Definition: DataBoxTag.hpp:29
Defines a list of useful type aliases for tensors.
Wraps the template metaprogramming library used (brigand)
Items related to hydrodynamic systems.
Definition: LorentzFactor.hpp:13
Defines classes SimpleTag, PrefixTag, ComputeTag and several functions for retrieving tag info...
Tensor< T, Symmetry<>, index_list<> > Scalar
Scalar type.
Definition: TypeAliases.hpp:21