SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/CurvedScalarWave - Tags.hpp Hit Total Coverage
Commit: 1f2210958b4f38fdc0400907ee7c6d5af5111418 Lines: 7 31 22.6 %
Date: 2025-12-05 05:03:31
Legend: Lines: hit not hit

          Line data    Source code
       1           1 : // Distributed under the MIT License.
       2             : // See LICENSE.txt for details.
       3             : 
       4             : /// \file
       5             : /// Defines DataBox tags for the curved scalar wave system
       6             : 
       7             : #pragma once
       8             : 
       9             : #include <cstddef>
      10             : #include <string>
      11             : 
      12             : #include "DataStructures/DataBox/Tag.hpp"
      13             : #include "DataStructures/Tensor/TypeAliases.hpp"
      14             : #include "Evolution/Systems/CurvedScalarWave/TagsDeclarations.hpp"
      15             : 
      16             : /// \cond
      17             : class DataVector;
      18             : template <class>
      19             : class Variables;
      20             : /// \endcond
      21             : 
      22             : /// \brief Option tags for the curved scalar wave system.
      23             : namespace CurvedScalarWave::OptionTags {}
      24             : 
      25             : namespace CurvedScalarWave::Tags {
      26             : 
      27             : /*!
      28             :  * \brief The scalar field.
      29             :  */
      30           1 : struct Psi : db::SimpleTag {
      31           0 :   using type = Scalar<DataVector>;
      32             : };
      33             : 
      34             : /*!
      35             :  * \brief The conjugate momentum of the scalar field.
      36             :  *
      37             :  * \details Its definition comes from requiring it to be the future-directed
      38             :  * time derivative of the scalar field \f$\Psi\f$ in curved spacetime, see
      39             :  * \cite Scheel2003vs , Eq. 2.16:
      40             :  *
      41             :  * \f{align}
      42             :  * \Pi :=& -n^a \partial_a \Psi \\
      43             :  *     =&  \frac{1}{\alpha}\left(\beta^k \partial_k \Psi -
      44             :  * {\partial_t\Psi}\right),\\ \f}
      45             :  *
      46             :  * where \f$n^a\f$ is the unit normal to spatial slices of the spacetime
      47             :  * foliation, \f$\alpha\f$ is the lapse and \f$\beta^i\f$ is the shift vector.
      48             :  */
      49           1 : struct Pi : db::SimpleTag {
      50           0 :   using type = Scalar<DataVector>;
      51             : };
      52             : 
      53             : /*!
      54             :  * \brief Auxiliary variable which is analytically the spatial derivative of the
      55             :  * scalar field.
      56             :  * \details If \f$\Psi\f$ is the scalar field then we define
      57             :  * \f$\Phi_{i} = \partial_i \Psi\f$
      58             :  */
      59             : template <size_t SpatialDim>
      60           1 : struct Phi : db::SimpleTag {
      61           0 :   using type = tnsr::i<DataVector, SpatialDim>;
      62             : };
      63             : 
      64           0 : struct ConstraintGamma1 : db::SimpleTag {
      65           0 :   using type = Scalar<DataVector>;
      66             : };
      67             : 
      68           0 : struct ConstraintGamma2 : db::SimpleTag {
      69           0 :   using type = Scalar<DataVector>;
      70             : };
      71             : 
      72             : /*!
      73             :  * \brief Tag for the one-index constraint of the scalar wave
      74             :  * system in curved spacetime.
      75             :  *
      76             :  * For details on how this is defined and computed, see
      77             :  * `OneIndexConstraintCompute`.
      78             :  */
      79             : template <size_t SpatialDim>
      80           1 : struct OneIndexConstraint : db::SimpleTag {
      81           0 :   using type = tnsr::i<DataVector, SpatialDim, Frame::Inertial>;
      82             : };
      83             : /*!
      84             :  * \brief Tag for the two-index constraint of the scalar wave
      85             :  * system in curved spacetime.
      86             :  *
      87             :  * For details on how this is defined and computed, see
      88             :  * `TwoIndexConstraintCompute`.
      89             :  */
      90             : template <size_t SpatialDim>
      91           1 : struct TwoIndexConstraint : db::SimpleTag {
      92           0 :   using type = tnsr::ij<DataVector, SpatialDim, Frame::Inertial>;
      93             : };
      94             : 
      95             : /// @{
      96             : /// \brief Tags corresponding to the characteristic fields of the
      97             : /// scalar-wave system in curved spacetime.
      98             : ///
      99             : /// \details For details on how these are defined and computed, \see
     100             : /// CharacteristicSpeedsCompute
     101           1 : struct VPsi : db::SimpleTag {
     102           0 :   using type = Scalar<DataVector>;
     103             : };
     104             : template <size_t Dim>
     105           0 : struct VZero : db::SimpleTag {
     106           0 :   using type = tnsr::i<DataVector, Dim, Frame::Inertial>;
     107             : };
     108           0 : struct VPlus : db::SimpleTag {
     109           0 :   using type = Scalar<DataVector>;
     110             : };
     111           0 : struct VMinus : db::SimpleTag {
     112           0 :   using type = Scalar<DataVector>;
     113             : };
     114             : /// @}
     115             : 
     116             : template <size_t Dim>
     117           0 : struct CharacteristicSpeeds : db::SimpleTag {
     118           0 :   using type = std::array<DataVector, 4>;
     119             : };
     120             : 
     121           0 : struct LargestCharacteristicSpeed : db::SimpleTag {
     122           0 :   using type = double;
     123             : };
     124             : 
     125             : template <size_t Dim>
     126           0 : struct CharacteristicFields : db::SimpleTag {
     127           0 :   using type = Variables<tmpl::list<VPsi, VZero<Dim>, VPlus, VMinus>>;
     128             : };
     129             : 
     130             : template <size_t Dim>
     131           0 : struct EvolvedFieldsFromCharacteristicFields : db::SimpleTag {
     132           0 :   using type = Variables<tmpl::list<Psi, Pi, Phi<Dim>>>;
     133             : };
     134             : }  // namespace CurvedScalarWave::Tags

Generated by: LCOV version 1.14