SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/Hydro - SpecificEntropy.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 37.5 % 8 3
Test Date: 2026-10-22 17:29:42
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 <cstddef>
       7              : 
       8              : #include "DataStructures/DataBox/Tag.hpp"
       9              : #include "DataStructures/Tensor/TypeAliases.hpp"
      10              : #include "PointwiseFunctions/Hydro/Tags.hpp"
      11              : #include "PointwiseFunctions/Hydro/TagsDeclarations.hpp"
      12              : #include "Utilities/Gsl.hpp"
      13              : #include "Utilities/TMPL.hpp"
      14              : 
      15              : /// \cond
      16              : namespace EquationsOfState {
      17              : template <bool IsRelativistic, size_t ThermodynamicDim>
      18              : class EquationOfState;
      19              : }  // namespace EquationsOfState
      20              : /// \endcond
      21              : 
      22              : namespace hydro {
      23              : /// @{
      24              : /*!
      25              :  * \ingroup EquationsOfStateGroup
      26              :  * \brief Computes the specific entropy
      27              :  */
      28              : template <typename DataType, size_t ThermodynamicDim>
      29            1 : void specific_entropy(
      30              :     gsl::not_null<Scalar<DataType>*> result,
      31              :     const Scalar<DataType>& rest_mass_density,
      32              :     const Scalar<DataType>& temperature,
      33              :     const Scalar<DataType>& electron_fraction,
      34              :     const EquationsOfState::EquationOfState<true, ThermodynamicDim>&
      35              :         equation_of_state);
      36              : 
      37              : template <typename DataType, size_t ThermodynamicDim>
      38            1 : Scalar<DataType> specific_entropy(
      39              :     const Scalar<DataType>& rest_mass_density,
      40              :     const Scalar<DataType>& temperature,
      41              :     const Scalar<DataType>& electron_fraction,
      42              :     const EquationsOfState::EquationOfState<true, ThermodynamicDim>&
      43              :         equation_of_state);
      44              : /// @}
      45              : 
      46              : namespace Tags {
      47              : /// Compute item for the specific entropy \f$s\f$.
      48              : /// \see hydro::specific_entropy
      49              : ///
      50              : /// Can be retrieved using `hydro::Tags::SpecificEntropy`
      51              : template <typename DataType>
      52            1 : struct SpecificEntropyCompute : SpecificEntropy<DataType>, db::ComputeTag {
      53            0 :   using argument_tags =
      54              :       typename tmpl::list<RestMassDensity<DataType>, Temperature<DataType>,
      55              :                           ElectronFraction<DataType>,
      56              :                           hydro::Tags::GrmhdEquationOfState>;
      57              : 
      58            0 :   using return_type = Scalar<DataType>;
      59              : 
      60              :   template <typename EquationOfStateType>
      61            0 :   static void function(const gsl::not_null<Scalar<DataType>*> result,
      62              :                        const Scalar<DataType>& rest_mass_density,
      63              :                        const Scalar<DataType>& temperature,
      64              :                        const Scalar<DataType>& electron_fraction,
      65              :                        const EquationOfStateType& equation_of_state) {
      66              :     specific_entropy(result, rest_mass_density, temperature, electron_fraction,
      67              :                      equation_of_state);
      68              :   }
      69              : 
      70            0 :   using base = SpecificEntropy<DataType>;
      71              : };
      72              : }  // namespace Tags
      73              : }  // namespace hydro
        

Generated by: LCOV version 2.0-1