SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/GeneralizedHarmonic - Tags.hpp Hit Total Coverage
Commit: 1e29a35ad8559408f21493dc5db8a49a237bb2f0 Lines: 19 52 36.5 %
Date: 2026-03-31 22:27:51
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`, and
     172             :  * `ConstraintEnergyCompute` respectively
     173             :  */
     174             : template <typename DataType, size_t SpatialDim, typename Frame>
     175           1 : struct GaugeConstraint : db::SimpleTag {
     176           0 :   using type = tnsr::a<DataType, SpatialDim, Frame>;
     177             : };
     178             : /// \copydoc GaugeConstraint
     179             : template <typename DataType, size_t SpatialDim, typename Frame>
     180           1 : struct FConstraint : db::SimpleTag {
     181           0 :   using type = tnsr::a<DataType, SpatialDim, Frame>;
     182             : };
     183             : /// \copydoc GaugeConstraint
     184             : template <typename DataType, size_t SpatialDim, typename Frame>
     185           1 : struct TwoIndexConstraint : db::SimpleTag {
     186           0 :   using type = tnsr::ia<DataType, SpatialDim, Frame>;
     187             : };
     188             : /// \copydoc GaugeConstraint
     189             : template <typename DataType, size_t SpatialDim, typename Frame>
     190           1 : struct ThreeIndexConstraint : db::SimpleTag {
     191           0 :   using type = tnsr::iaa<DataType, SpatialDim, Frame>;
     192             : };
     193             : /// \copydoc GaugeConstraint
     194             : template <typename DataType, size_t SpatialDim, typename Frame>
     195           1 : struct FourIndexConstraint : db::SimpleTag {
     196           0 :   using type = tnsr::iaa<DataType, SpatialDim, Frame>;
     197             : };
     198             : /// \copydoc GaugeConstraint
     199             : template <typename DataType, size_t SpatialDim, typename Frame>
     200           1 : struct ConstraintEnergy : db::SimpleTag {
     201           0 :   using type = Scalar<DataType>;
     202             : };
     203             : }  // namespace Tags
     204             : 
     205           1 : namespace OptionTags {
     206             : /*!
     207             :  * \ingroup OptionGroupsGroup
     208             :  * Groups option tags related to the GeneralizedHarmonic evolution system.
     209             :  */
     210           1 : struct Group {
     211           0 :   static std::string name() { return "GeneralizedHarmonic"; }
     212           0 :   static constexpr Options::String help{"Options for the GH evolution system"};
     213           0 :   using group = evolution::OptionTags::SystemGroup;
     214             : };
     215             : }  // namespace OptionTags
     216             : }  // namespace gh

Generated by: LCOV version 1.14