SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/NewtonianEuler - RamPressure.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/Tensor.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 ram pressure, \f$\rho v^i v^j\f$, where \f$\rho\f$ is the
      20              :  * mass density, and \f$v^i\f$ is the velocity.
      21              :  */
      22              : template <typename DataType, size_t Dim, typename Fr>
      23            1 : void ram_pressure(gsl::not_null<tnsr::II<DataType, Dim, Fr>*> result,
      24              :                   const Scalar<DataType>& mass_density,
      25              :                   const tnsr::I<DataType, Dim, Fr>& velocity);
      26              : 
      27              : template <typename DataType, size_t Dim, typename Fr>
      28            1 : tnsr::II<DataType, Dim, Fr> ram_pressure(
      29              :     const Scalar<DataType>& mass_density,
      30              :     const tnsr::I<DataType, Dim, Fr>& velocity);
      31              : /// @}
      32              : 
      33              : namespace Tags {
      34              : /// Compute item for the ram pressure, \f$\rho v^i v^j\f$.
      35              : /// \see NewtonianEuler::ram_pressure
      36              : ///
      37              : /// Can be retrieved using `NewtonianEuler::Tags::RamPressure`
      38              : template <typename DataType, size_t Dim, typename Fr = Frame::Inertial>
      39            1 : struct RamPressureCompute : RamPressure<DataType, Dim, Fr>, db::ComputeTag {
      40            0 :   using base = RamPressure<DataType, Dim, Fr>;
      41              : 
      42            0 :   using argument_tags =
      43              :       tmpl::list<hydro::Tags::RestMassDensity<DataType>,
      44              :                  hydro::Tags::SpatialVelocity<DataType, Dim, Fr>>;
      45              : 
      46            0 :   using return_type = tnsr::II<DataType, Dim, Fr>;
      47              : 
      48            0 :   static constexpr auto function = static_cast<void (*)(
      49              :       const gsl::not_null<tnsr::II<DataType, Dim, Fr>*>,
      50              :       const Scalar<DataType>&, const tnsr::I<DataType, Dim, Fr>&)>(
      51              :       &ram_pressure<DataType, Dim, Fr>);
      52              : };
      53              : }  // namespace Tags
      54              : }  // namespace NewtonianEuler
        

Generated by: LCOV version 2.0-1