SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/Hydro - InversePlasmaBeta.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 44.4 % 9 4
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 "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              :  * \brief Computes the inverse plasma beta
      22              :  *
      23              :  * The inverse plasma beta \f$\beta^{-1} = b^2 / (2 p)\f$, where
      24              :  * \f$b^2\f$ is the square of the comoving magnetic field amplitude
      25              :  * and \f$p\f$ is the fluid pressure.
      26              :  */
      27              : template <typename DataType>
      28            1 : void inverse_plasma_beta(
      29              :     gsl::not_null<Scalar<DataType>*> result,
      30              :     const Scalar<DataType>& comoving_magnetic_field_magnitude,
      31              :     const Scalar<DataType>& fluid_pressure);
      32              : 
      33              : template <typename DataType>
      34            1 : Scalar<DataType> inverse_plasma_beta(
      35              :     const Scalar<DataType>& comoving_magnetic_field_magnitude,
      36              :     const Scalar<DataType>& fluid_pressure);
      37              : /// @}
      38              : 
      39            1 : namespace Tags {
      40              : /// Can be retrieved using `hydro::Tags::InversePlasmaBeta`
      41              : template <typename DataType>
      42            1 : struct InversePlasmaBetaCompute : InversePlasmaBeta<DataType>, db::ComputeTag {
      43            0 :   using base = InversePlasmaBeta<DataType>;
      44            0 :   using return_type = Scalar<DataType>;
      45              : 
      46            0 :   using argument_tags =
      47              :       tmpl::list<ComovingMagneticFieldMagnitude<DataType>, Pressure<DataType>>;
      48              : 
      49            0 :   static constexpr auto function = static_cast<void (*)(
      50              :       gsl::not_null<Scalar<DataType>*>, const Scalar<DataType>&,
      51              :       const Scalar<DataType>&)>(&inverse_plasma_beta<DataType>);
      52              : };
      53              : }  // namespace Tags
      54              : }  // namespace hydro
        

Generated by: LCOV version 2.0-1