SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/GeneralizedHarmonic - Tags.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 37.0 % 54 20
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 <string>
       7              : 
       8              : #include "DataStructures/DataBox/Prefixes.hpp"
       9              : #include "DataStructures/DataBox/Tag.hpp"
      10              : #include "DataStructures/Tensor/TypeAliases.hpp"
      11              : #include "Evolution/Systems/GeneralizedHarmonic/TagsDeclarations.hpp"
      12              : #include "Evolution/Tags.hpp"
      13              : #include "Options/String.hpp"
      14              : #include "PointwiseFunctions/GeneralRelativity/TagsDeclarations.hpp"
      15              : 
      16              : namespace gh {
      17              : namespace Tags {
      18              : /*!
      19              :  * \brief Conjugate momentum to the spacetime metric.
      20              :  *
      21              :  * \details If \f$ g_{ab} \f$ is the spacetime metric, and \f$ \alpha \f$ and
      22              :  * \f$ \beta^i \f$ are the lapse and shift respectively, then we define
      23              :  * \f$ \Pi_{ab} = -\frac{1}{\alpha} ( \partial_t g_{ab} + \beta^{i} \Phi_{iab} )
      24              :  * \f$ where \f$\Phi_{iab}\f$ is the variable defined by the tag Phi.
      25              :  */
      26              : template <typename DataType, size_t Dim, typename Frame>
      27            1 : struct Pi : db::SimpleTag {
      28            0 :   using type = tnsr::aa<DataType, Dim, Frame>;
      29              : };
      30              : 
      31              : /*!
      32              :  * \brief Auxiliary variable which is analytically the spatial derivative of the
      33              :  * spacetime metric
      34              :  * \details If \f$g_{ab}\f$ is the spacetime metric then we define
      35              :  * \f$\Phi_{iab} = \partial_i g_{ab}\f$
      36              :  */
      37              : template <typename DataType, size_t Dim, typename Frame>
      38            1 : struct Phi : db::SimpleTag {
      39            0 :   using type = tnsr::iaa<DataType, Dim, Frame>;
      40              : };
      41              : 
      42              : /*!
      43              :  * \brief Gauge source function for the generalized harmonic system.
      44              :  *
      45              :  * \details In the generalized / damped harmonic gauge, unlike the simple
      46              :  * harmonic gauge, the right hand side of the gauge equation
      47              :  * \f$ \square x_a = H_a\f$ is sourced by non-vanishing functions. This variable
      48              :  * stores those functions \f$ H_a\f$.
      49              :  */
      50              : template <typename DataType, size_t Dim, typename Frame>
      51            1 : struct GaugeH : db::SimpleTag {
      52            0 :   using type = tnsr::a<DataType, Dim, Frame>;
      53              : };
      54              : 
      55              : /*!
      56              :  * \brief Spacetime derivatives of the gauge source function for the
      57              :  * generalized harmonic system.
      58              :  *
      59              :  * \details In the generalized / damped harmonic gauge, the right hand side of
      60              :  * the gauge equation \f$ \square x_a = H_a\f$ is sourced by non-vanishing
      61              :  * functions \f$ H_a\f$. This variable stores their spacetime derivatives
      62              :  * \f$ \partial_b H_a\f$.
      63              :  */
      64              : template <typename DataType, size_t Dim, typename Frame>
      65            1 : struct SpacetimeDerivGaugeH : db::SimpleTag {
      66            0 :   using type = tnsr::ab<DataType, Dim, Frame>;
      67              : };
      68              : 
      69              : /*!
      70              :  * \brief Initial value of the gauge source function for the generalized
      71              :  * harmonic system.
      72              :  *
      73              :  * \details In the generalized / damped harmonic gauge, unlike the simple
      74              :  * harmonic gauge, the right hand side of the gauge equation
      75              :  * \f$ \square x_a = H_a\f$ is sourced by non-vanishing functions. This variable
      76              :  * stores the initial or starting value of those functions \f$ H_a\f$, which
      77              :  * are set by the user (based on the choice of initial data) to begin evolution.
      78              :  */
      79              : template <typename DataType, size_t Dim, typename Frame>
      80            1 : struct InitialGaugeH : db::SimpleTag {
      81            0 :   using type = tnsr::a<DataType, Dim, Frame>;
      82              : };
      83              : 
      84              : /*!
      85              :  * \brief Initial spacetime derivatives of the gauge source function
      86              :  * for the generalized harmonic system.
      87              :  *
      88              :  * \details In the generalized / damped harmonic gauge, the right hand side of
      89              :  * the gauge equation \f$ \square x_a = H_a\f$ is sourced by non-vanishing
      90              :  * functions \f$ H_a\f$. This variable stores the initial or starting value of
      91              :  * the spacetime derivatives of those functions \f$ \partial_b H_a\f$, which
      92              :  * are set by the user (based on the choice of initial data) to begin evolution.
      93              :  */
      94              : template <typename DataType, size_t Dim, typename Frame>
      95            1 : struct SpacetimeDerivInitialGaugeH : db::SimpleTag {
      96            0 :   using type = tnsr::ab<DataType, Dim, Frame>;
      97              : };
      98              : 
      99              : /// @{
     100              : /// \brief Tags corresponding to the characteristic fields of the generalized
     101              : /// harmonic system.
     102              : ///
     103              : /// \details For details on how these are defined and computed, see
     104              : /// CharacteristicSpeedsCompute
     105              : template <typename DataType, size_t Dim, typename Frame>
     106            1 : struct VSpacetimeMetric : db::SimpleTag {
     107            0 :   using type = tnsr::aa<DataType, Dim, Frame>;
     108              : };
     109              : template <typename DataType, size_t Dim, typename Frame>
     110            0 : struct VZero : db::SimpleTag {
     111            0 :   using type = tnsr::iaa<DataType, Dim, Frame>;
     112              : };
     113              : template <typename DataType, size_t Dim, typename Frame>
     114            0 : struct VPlus : db::SimpleTag {
     115            0 :   using type = tnsr::aa<DataType, Dim, Frame>;
     116              : };
     117              : template <typename DataType, size_t Dim, typename Frame>
     118            0 : struct VMinus : db::SimpleTag {
     119            0 :   using type = tnsr::aa<DataType, Dim, Frame>;
     120              : };
     121              : /// @}
     122              : 
     123              : template <typename DataType, size_t Dim, typename Frame>
     124            0 : struct CharacteristicSpeeds : db::SimpleTag {
     125            0 :   using type = std::array<DataType, 4>;
     126              : };
     127              : 
     128              : /*!
     129              :  * \brief Characterisic speed as type `tnsr::I`, for use in observing in
     130              :  * `ElementLogical` frame in terms of logical directions.
     131              :  */
     132              : template <typename DataType, size_t SpatialDim, typename Frame>
     133            1 : struct VSpacetimeMetricSpeed : db::SimpleTag {
     134            0 :   using type = tnsr::I<DataType, SpatialDim, Frame>;
     135              : };
     136              : /// \copydoc VSpacetimeMetricSpeed
     137              : template <typename DataType, size_t SpatialDim, typename Frame>
     138            1 : struct VZeroSpeed : db::SimpleTag {
     139            0 :   using type = tnsr::I<DataType, SpatialDim, Frame>;
     140              : };
     141              : /// \copydoc VSpacetimeMetricSpeed
     142              : template <typename DataType, size_t SpatialDim, typename Frame>
     143            1 : struct VPlusSpeed : db::SimpleTag {
     144            0 :   using type = tnsr::I<DataType, SpatialDim, Frame>;
     145              : };
     146              : /// \copydoc VSpacetimeMetricSpeed
     147              : template <typename DataType, size_t SpatialDim, typename Frame>
     148            1 : struct VMinusSpeed : db::SimpleTag {
     149            0 :   using type = tnsr::I<DataType, SpatialDim, Frame>;
     150              : };
     151              : 
     152              : template <typename DataType, size_t Dim, typename Frame>
     153            0 : struct CharacteristicFields : db::SimpleTag {
     154            0 :   using type = Variables<tmpl::list<
     155              :       VSpacetimeMetric<DataType, Dim, Frame>, VZero<DataType, Dim, Frame>,
     156              :       VPlus<DataType, Dim, Frame>, VMinus<DataType, Dim, Frame>>>;
     157              : };
     158              : 
     159              : template <typename DataType, size_t Dim, typename Frame>
     160            0 : struct EvolvedFieldsFromCharacteristicFields : db::SimpleTag {
     161            0 :   using type = Variables<
     162              :       tmpl::list<gr::Tags::SpacetimeMetric<DataType, Dim, Frame>,
     163              :                  Pi<DataType, Dim, Frame>, Phi<DataType, Dim, Frame>>>;
     164              : };
     165              : 
     166              : /*!
     167              :  * \brief Tags corresponding to various constraints of the generalized
     168              :  * harmonic system, and their diagnostically useful combinations.
     169              :  * \details For details on how these are defined and computed, see
     170              :  * `GaugeConstraintCompute`, `FConstraintCompute`, `TwoIndexConstraintCompute`,
     171              :  * `ThreeIndexConstraintCompute`, `FourIndexConstraintCompute`,
     172              :  * `ConstraintEnergyCompute`, and `NormalizedConstraintEnergyCompute`
     173              :  * respectively
     174              :  */
     175              : template <typename DataType, size_t SpatialDim, typename Frame>
     176            1 : struct GaugeConstraint : db::SimpleTag {
     177            0 :   using type = tnsr::a<DataType, SpatialDim, Frame>;
     178              : };
     179              : /// \copydoc GaugeConstraint
     180              : template <typename DataType, size_t SpatialDim, typename Frame>
     181            1 : struct FConstraint : db::SimpleTag {
     182            0 :   using type = tnsr::a<DataType, SpatialDim, Frame>;
     183              : };
     184              : /// \copydoc GaugeConstraint
     185              : template <typename DataType, size_t SpatialDim, typename Frame>
     186            1 : struct TwoIndexConstraint : db::SimpleTag {
     187            0 :   using type = tnsr::ia<DataType, SpatialDim, Frame>;
     188              : };
     189              : /// \copydoc GaugeConstraint
     190              : template <typename DataType, size_t SpatialDim, typename Frame>
     191            1 : struct ThreeIndexConstraint : db::SimpleTag {
     192            0 :   using type = tnsr::iaa<DataType, SpatialDim, Frame>;
     193              : };
     194              : /// \copydoc GaugeConstraint
     195              : template <typename DataType, size_t SpatialDim, typename Frame>
     196            1 : struct FourIndexConstraint : db::SimpleTag {
     197            0 :   using type = tnsr::iaa<DataType, SpatialDim, Frame>;
     198              : };
     199              : /// \copydoc GaugeConstraint
     200              : template <typename DataType, size_t SpatialDim, typename Frame>
     201            1 : struct ConstraintEnergy : db::SimpleTag {
     202            0 :   using type = Scalar<DataType>;
     203              : };
     204              : /// \copydoc GaugeConstraint
     205              : template <typename DataType, size_t SpatialDim, typename Frame>
     206            1 : struct NormalizedConstraintEnergy : db::SimpleTag {
     207            0 :   using type = Scalar<DataType>;
     208              : };
     209              : }  // namespace Tags
     210              : 
     211            1 : namespace OptionTags {
     212              : /*!
     213              :  * \ingroup OptionGroupsGroup
     214              :  * Groups option tags related to the GeneralizedHarmonic evolution system.
     215              :  */
     216            1 : struct Group {
     217            0 :   static std::string name() { return "GeneralizedHarmonic"; }
     218            0 :   static constexpr Options::String help{"Options for the GH evolution system"};
     219            0 :   using group = evolution::OptionTags::SystemGroup;
     220              : };
     221              : }  // namespace OptionTags
     222              : }  // namespace gh
        

Generated by: LCOV version 2.0-1