SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/NewtonianMhd - Tags.hpp Coverage Total Hit
Commit: a37d7b3c1803b88b537d2aef1c27ca5e6b499398 Lines: 27.4 % 62 17
Test Date: 2026-11-12 04:47:19
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              : #include <string>
       8              : 
       9              : #include "DataStructures/DataBox/Tag.hpp"
      10              : #include "DataStructures/Tensor/TypeAliases.hpp"
      11              : #include "Evolution/Systems/NewtonianMhd/Sources/Source.hpp"
      12              : #include "Evolution/Systems/NewtonianMhd/TagsDeclarations.hpp"
      13              : #include "Evolution/Tags.hpp"
      14              : #include "Options/String.hpp"
      15              : 
      16              : /// \cond
      17              : class DataVector;
      18              : /// \endcond
      19              : 
      20              : /// %OptionTags for the conservative formulation of the Newtonian Euler system
      21              : namespace NewtonianMhd {
      22              : /// %OptionTags for the Newtonian MHD system
      23            1 : namespace OptionTags {
      24              : template <size_t Dim>
      25            0 : struct SourceTerm {
      26            0 :   using type = std::unique_ptr<NewtonianMhd::Sources::Source<Dim>>;
      27            0 :   static constexpr Options::String help = "The source term to be used.";
      28            0 :   using group = ::evolution::OptionTags::SystemGroup;
      29              : };
      30              : 
      31            0 : struct DivergenceCleaningSpeed {
      32            0 :   using type = double;
      33            0 :   static constexpr Options::String help =
      34              :       "Propagation speed of the hyperbolic divergence-cleaning waves.";
      35            0 :   using group = ::evolution::OptionTags::SystemGroup;
      36              : };
      37              : 
      38            0 : struct DampingParameter {
      39            0 :   using type = double;
      40            0 :   static constexpr Options::String help =
      41              :       "Constraint damping parameter for divergence cleaning.";
      42            0 :   using group = ::evolution::OptionTags::SystemGroup;
      43              : };
      44              : }  // namespace OptionTags
      45              : 
      46              : /// %Tags for the conservative formulation of the Newtonian Euler system
      47              : namespace Tags {
      48              : /// The mass density of the fluid (as a conservative variable).
      49            1 : struct MassDensityCons : db::SimpleTag {
      50            0 :   using type = Scalar<DataVector>;
      51              : };
      52              : 
      53              : /// The momentum density of the fluid.
      54              : template <size_t Dim, typename Fr>
      55            1 : struct MomentumDensity : db::SimpleTag {
      56            0 :   using type = tnsr::I<DataVector, Dim, Fr>;
      57            0 :   static std::string name() { return Frame::prefix<Fr>() + "MomentumDensity"; }
      58              : };
      59              : 
      60              : /// The energy density of the fluid.
      61            1 : struct EnergyDensity : db::SimpleTag {
      62            0 :   using type = Scalar<DataVector>;
      63              : };
      64              : 
      65              : /// The magnetic field \f$B^i\f$ as a conservative variable.
      66              : ///
      67              : /// Only present when the system is instantiated with
      68              : /// `EvolveMagneticField == true`.
      69              : template <typename Fr>
      70            1 : struct MagneticFieldCons : db::SimpleTag {
      71            0 :   using type = tnsr::I<DataVector, 3, Fr>;
      72            0 :   static std::string name() {
      73              :     return Frame::prefix<Fr>() + "MagneticFieldCons";
      74              :   }
      75              : };
      76              : 
      77              : /// The GLM divergence-cleaning field \f$\psi\f$ as a conservative variable.
      78            1 : struct DivergenceCleaningFieldCons : db::SimpleTag {
      79            0 :   using type = Scalar<DataVector>;
      80              : };
      81              : 
      82              : /// The GLM cleaning propagation speed \f$c_h\f$.
      83            1 : struct DivergenceCleaningSpeed : db::SimpleTag {
      84            0 :   using type = double;
      85            0 :   using option_tags = tmpl::list<OptionTags::DivergenceCleaningSpeed>;
      86            0 :   static constexpr bool pass_metavariables = false;
      87            0 :   static type create_from_options(const double value) { return value; }
      88              : };
      89              : 
      90              : /// The constraint damping parameter for divergence cleaning.
      91            1 : struct ConstraintDampingParameter : db::SimpleTag {
      92            0 :   using type = double;
      93            0 :   using option_tags = tmpl::list<OptionTags::DampingParameter>;
      94            0 :   static constexpr bool pass_metavariables = false;
      95            0 :   static type create_from_options(const double value) { return value; }
      96              : };
      97              : 
      98              : /// The sound speed.
      99              : template <typename DataType>
     100            1 : struct SoundSpeed : db::SimpleTag {
     101            0 :   using type = Scalar<DataType>;
     102              : };
     103              : 
     104              : /// The characteristic speeds.
     105              : template <size_t Dim>
     106            1 : struct CharacteristicSpeeds : db::SimpleTag {
     107            0 :   using type = std::array<DataVector, Dim + 2>;
     108              : };
     109              : 
     110              : /// @{
     111              : /// The characteristic fields of the NewtonianMhd system.
     112            1 : struct VMinus : db::SimpleTag {
     113            0 :   using type = Scalar<DataVector>;
     114              : };
     115              : template <size_t Dim>
     116            0 : struct VMomentum : db::SimpleTag {
     117            0 :   using type = tnsr::I<DataVector, Dim>;
     118              : };
     119            0 : struct VPlus : db::SimpleTag {
     120            0 :   using type = Scalar<DataVector>;
     121              : };
     122              : /// @}
     123              : 
     124              : /// The internal energy density.
     125              : template <typename DataType>
     126            1 : struct InternalEnergyDensity : db::SimpleTag {
     127            0 :   using type = Scalar<DataType>;
     128              : };
     129              : 
     130              : /// The kinetic energy density.
     131              : template <typename DataType>
     132            1 : struct KineticEnergyDensity : db::SimpleTag {
     133            0 :   using type = Scalar<DataType>;
     134              : };
     135              : 
     136              : /// The local Mach number of the flow
     137              : template <typename DataType>
     138            1 : struct MachNumber : db::SimpleTag {
     139            0 :   using type = Scalar<DataType>;
     140              : };
     141              : 
     142              : /// The ram pressure of the fluid.
     143              : template <typename DataType, size_t Dim, typename Fr>
     144            1 : struct RamPressure : db::SimpleTag {
     145            0 :   using type = tnsr::II<DataType, Dim, Fr>;
     146            0 :   static std::string name() { return Frame::prefix<Fr>() + "RamPressure"; }
     147              : };
     148              : 
     149              : /// The specific kinetic energy.
     150              : template <typename DataType>
     151            1 : struct SpecificKineticEnergy : db::SimpleTag {
     152            0 :   using type = Scalar<DataType>;
     153              : };
     154              : 
     155              : /// The source term in the evolution equations
     156              : template <size_t Dim>
     157            1 : struct SourceTerm : db::SimpleTag {
     158            0 :   using type = std::unique_ptr<NewtonianMhd::Sources::Source<Dim>>;
     159              : 
     160            0 :   using option_tags = tmpl::list<OptionTags::SourceTerm<Dim>>;
     161              : 
     162            0 :   static constexpr bool pass_metavariables = false;
     163            0 :   static type create_from_options(const type& source_term) {
     164              :     return source_term->get_clone();
     165              :   }
     166              : };
     167              : 
     168              : }  // namespace Tags
     169              : }  // namespace NewtonianMhd
        

Generated by: LCOV version 2.0-1