SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/Hydro - SpecificEnthalpy.hpp Hit Total Coverage
Commit: 37c384043430860f87787999aa7399d01bb3d213 Lines: 3 8 37.5 %
Date: 2024-04-20 02:24:02
Legend: Lines: hit not hit

          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/Tag.hpp"
       7             : #include "DataStructures/Tensor/TypeAliases.hpp"
       8             : #include "PointwiseFunctions/Hydro/TagsDeclarations.hpp"
       9             : #include "Utilities/TMPL.hpp"
      10             : 
      11             : /// \cond
      12             : namespace gsl {
      13             : template <typename>
      14             : struct not_null;
      15             : }  // namespace gsl
      16             : /// \endcond
      17             : 
      18             : namespace hydro {
      19             : /// @{
      20             : /*!
      21             :  * \ingroup EquationsOfStateGroup
      22             :  * \brief Computes the relativistic specific enthalpy \f$h\f$ as:
      23             :  * \f$ h = 1 + \epsilon + \frac{p}{\rho} \f$
      24             :  * where \f$\epsilon\f$ is the specific internal energy, \f$p\f$
      25             :  * is the pressure, and \f$\rho\f$ is the rest mass density.
      26             :  */
      27             : template <typename DataType>
      28           1 : void relativistic_specific_enthalpy(
      29             :     gsl::not_null<Scalar<DataType>*> result,
      30             :     const Scalar<DataType>& rest_mass_density,
      31             :     const Scalar<DataType>& specific_internal_energy,
      32             :     const Scalar<DataType>& pressure);
      33             : 
      34             : template <typename DataType>
      35           1 : Scalar<DataType> relativistic_specific_enthalpy(
      36             :     const Scalar<DataType>& rest_mass_density,
      37             :     const Scalar<DataType>& specific_internal_energy,
      38             :     const Scalar<DataType>& pressure);
      39             : /// @}
      40             : 
      41             : namespace Tags {
      42             : /// Compute item for the relativistic specific enthalpy \f$h\f$.
      43             : ///
      44             : /// Can be retrieved using `hydro::Tags::SpecificEnthalpy`
      45             : template <typename DataType>
      46           1 : struct SpecificEnthalpyCompute : SpecificEnthalpy<DataType>, db::ComputeTag {
      47           0 :   using argument_tags =
      48             :       tmpl::list<RestMassDensity<DataType>, SpecificInternalEnergy<DataType>,
      49             :                  Pressure<DataType>>;
      50             : 
      51           0 :   using return_type = Scalar<DataType>;
      52             : 
      53           0 :   static constexpr auto function = static_cast<void (*)(
      54             :       gsl::not_null<Scalar<DataType>*>, const Scalar<DataType>&,
      55             :       const Scalar<DataType>&, const Scalar<DataType>&)>(
      56             :       &relativistic_specific_enthalpy<DataType>);
      57             : 
      58           0 :   using base = SpecificEnthalpy<DataType>;
      59             : };
      60             : }  // namespace Tags
      61             : }  // namespace hydro

Generated by: LCOV version 1.14