SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/Ccz4 - Tags.hpp Hit Total Coverage
Commit: a6a8ee404306bec9d92da8ab89f636b037aefc25 Lines: 29 57 50.9 %
Date: 2024-07-26 22:35:59
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/Ccz4/TagsDeclarations.hpp"
      12             : #include "Evolution/Tags.hpp"
      13             : #include "Options/String.hpp"
      14             : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
      15             : #include "PointwiseFunctions/GeneralRelativity/Tags/Conformal.hpp"
      16             : 
      17             : namespace Ccz4 {
      18           1 : namespace Tags {
      19             : /*!
      20             :  * \brief The conformal factor that rescales the spatial metric
      21             :  *
      22             :  * \details If \f$\gamma_{ij}\f$ is the spatial metric, then we define
      23             :  * \f$\phi = (det(\gamma_{ij}))^{-1/6}\f$.
      24             :  */
      25             : template <typename DataType>
      26           1 : struct ConformalFactor : db::SimpleTag {
      27           0 :   using type = Scalar<DataType>;
      28             : };
      29             : 
      30             : /*!
      31             :  * \brief The square of the conformal factor that rescales the spatial metric
      32             :  *
      33             :  * \details If \f$\gamma_{ij}\f$ is the spatial metric, then we define
      34             :  * \f$\phi^2 = (det(\gamma_{ij}))^{-1/3}\f$.
      35             :  */
      36             : template <typename DataType>
      37           1 : struct ConformalFactorSquared : db::SimpleTag {
      38           0 :   using type = Scalar<DataType>;
      39             : };
      40             : 
      41             : /*!
      42             :  * \brief The conformally scaled spatial metric
      43             :  *
      44             :  * \details If \f$\phi\f$ is the conformal factor and \f$\gamma_{ij}\f$ is the
      45             :  * spatial metric, then we define
      46             :  * \f$\bar{\gamma}_{ij} = \phi^2 \gamma_{ij}\f$.
      47             :  */
      48             : template <typename DataType, size_t Dim, typename Frame>
      49           1 : using ConformalMetric =
      50             :     gr::Tags::Conformal<gr::Tags::SpatialMetric<DataType, Dim, Frame>, 2>;
      51             : 
      52             : /*!
      53             :  * \brief The conformally scaled inverse spatial metric
      54             :  *
      55             :  * \details If \f$\phi\f$ is the conformal factor and \f$\gamma^{ij}\f$ is the
      56             :  * inverse spatial metric, then we define
      57             :  * \f$\bar{\gamma}^{ij} = \phi^{-2} \gamma^{ij}\f$.
      58             :  */
      59             : template <typename DataType, size_t Dim, typename Frame>
      60           1 : using InverseConformalMetric =
      61             :     gr::Tags::Conformal<gr::Tags::InverseSpatialMetric<DataType, Dim, Frame>,
      62             :                         -2>;
      63             : 
      64             : /*!
      65             :  * \brief The trace-free part of the extrinsic curvature
      66             :  *
      67             :  * \details See `Ccz4::a_tilde()` for details.
      68             :  */
      69             : template <typename DataType, size_t Dim, typename Frame>
      70           1 : struct ATilde : db::SimpleTag {
      71           0 :   using type = tnsr::ii<DataType, Dim, Frame>;
      72             : };
      73             : 
      74             : /*!
      75             :  * \brief The trace of the trace-free part of the extrinsic curvature
      76             :  *
      77             :  * \details We define:
      78             :  *
      79             :  * \f{align}
      80             :  *     tr\tilde{A} &= \tilde{\gamma}^{ij} \tilde{A}_{ij}
      81             :  * \f}
      82             :  *
      83             :  * where \f$\tilde{\gamma}^{ij}\f$ is the inverse conformal spatial metric
      84             :  * defined by `Ccz4::Tags::InverseConformalMetric` and \f$\tilde{A}_{ij}\f$ is
      85             :  * the trace-free part of the extrinsic curvature defined by
      86             :  * `Ccz4::Tags::ATilde`.
      87             :  */
      88             : template <typename DataType>
      89           1 : struct TraceATilde : db::SimpleTag {
      90           0 :   using type = Scalar<DataType>;
      91             : };
      92             : 
      93             : /*!
      94             :  * \brief The natural log of the lapse
      95             :  */
      96             : template <typename DataType>
      97           1 : struct LogLapse : db::SimpleTag {
      98           0 :   using type = Scalar<DataType>;
      99             : };
     100             : 
     101             : /*!
     102             :  * \brief Auxiliary variable which is analytically the spatial derivative of the
     103             :  * natural log of the lapse
     104             :  *
     105             :  * \details If \f$ \alpha \f$ is the lapse, then we define
     106             :  * \f$A_i = \partial_i ln(\alpha) = \frac{\partial_i \alpha}{\alpha}\f$.
     107             :  */
     108             : template <typename DataType, size_t Dim, typename Frame>
     109           1 : struct FieldA : db::SimpleTag {
     110           0 :   using type = tnsr::i<DataType, Dim, Frame>;
     111             : };
     112             : 
     113             : /*!
     114             :  * \brief Auxiliary variable which is analytically the spatial derivative of the
     115             :  * shift
     116             :  */
     117             : template <typename DataType, size_t Dim, typename Frame>
     118           1 : struct FieldB : db::SimpleTag {
     119           0 :   using type = tnsr::iJ<DataType, Dim, Frame>;
     120             : };
     121             : 
     122             : /*!
     123             :  * \brief Auxiliary variable which is analytically half the spatial derivative
     124             :  * of the conformal spatial metric
     125             :  *
     126             :  * \details If \f$\bar{\gamma}_{ij}\f$ is the conformal spatial metric, then we
     127             :  * define
     128             :  * \f$D_{kij} = \frac{1}{2} \partial_k \bar{\gamma}_{ij}\f$.
     129             :  */
     130             : template <typename DataType, size_t Dim, typename Frame>
     131           1 : struct FieldD : db::SimpleTag {
     132           0 :   using type = tnsr::ijj<DataType, Dim, Frame>;
     133             : };
     134             : 
     135             : /*!
     136             :  * \brief The natural log of the conformal factor
     137             :  */
     138             : template <typename DataType>
     139           1 : struct LogConformalFactor : db::SimpleTag {
     140           0 :   using type = Scalar<DataType>;
     141             : };
     142             : 
     143             : /*!
     144             :  * \brief Auxiliary variable which is analytically the spatial derivative of the
     145             :  * natural log of the conformal factor
     146             :  *
     147             :  * \details If \f$\phi\f$ is the conformal factor, then we define
     148             :  * \f$P_i = \partial_i ln(\phi) = \frac{\partial_i \phi}{\phi}\f$.
     149             :  */
     150             : template <typename DataType, size_t Dim, typename Frame>
     151           1 : struct FieldP : db::SimpleTag {
     152           0 :   using type = tnsr::i<DataType, Dim, Frame>;
     153             : };
     154             : 
     155             : /*!
     156             :  * \brief Identity which is analytically negative one half the spatial
     157             :  * derivative of the inverse conformal spatial metric
     158             :  *
     159             :  * \details We define:
     160             :  * \f{align}
     161             :  *     D_k{}^{ij} &=
     162             :  *         \tilde{\gamma}^{in} \tilde{\gamma}^{mj} D_{knm} =
     163             :  *         -\frac{1}{2} \partial_k \tilde{\gamma}^{ij}
     164             :  * \f}
     165             :  * where \f$\tilde{\gamma}^{ij}\f$ and \f$D_{ijk}\f$ are the inverse conformal
     166             :  * spatial metric and the CCZ4 auxiliary variable defined by
     167             :  * `Ccz4::Tags::FieldD`, respectively.
     168             :  */
     169             : template <typename DataType, size_t Dim, typename Frame>
     170           1 : struct FieldDUp : db::SimpleTag {
     171           0 :   using type = tnsr::iJJ<DataType, Dim, Frame>;
     172             : };
     173             : 
     174             : /*!
     175             :  * \brief The conformal spatial christoffel symbols of the second kind
     176             :  *
     177             :  * \details We define:
     178             :  * \f{align}
     179             :  *     \tilde{\Gamma}^k_{ij} &=
     180             :  *         \tilde{\gamma}^{kl} (D_{ijl} + D_{jil} - D_{lij})
     181             :  * \f}
     182             :  * where \f$\tilde{\gamma}^{ij}\f$ and \f$D_{ijk}\f$ are the inverse conformal
     183             :  * spatial metric and the CCZ4 auxiliary variable defined by
     184             :  * `Ccz4::Tags::InverseConformalMetric` and `Ccz4::Tags::FieldD`, respectively.
     185             :  */
     186             : template <typename DataType, size_t Dim, typename Frame>
     187           1 : struct ConformalChristoffelSecondKind : db::SimpleTag {
     188           0 :   using type = tnsr::Ijj<DataType, Dim, Frame>;
     189             : };
     190             : 
     191             : /*!
     192             :  * \brief The spatial derivative of the conformal spatial christoffel symbols
     193             :  * of the second kind
     194             :  *
     195             :  * \details We define:
     196             :  * \f{align}
     197             :  *     \partial_k \tilde{\Gamma}^m{}_{ij} &=
     198             :  *       -2 D_k{}^{ml} (D_{ijl} + D_{jil} - D_{lij}) +
     199             :  *       \tilde{\gamma}^{ml}(\partial_{(k} D_{i)jl} + \partial_{(k} D_{j)il} -
     200             :  *       \partial_{(k} D_{l)ij})
     201             :  * \f}
     202             :  * where \f$\tilde{\gamma}^{ij}\f$, \f$D_{ijk}\f$, \f$\partial_l D_{ijk}\f$, and
     203             :  * \f$D_k{}^{ij}\f$ are the inverse conformal spatial metric defined by
     204             :  * `Ccz4::Tags::InverseConformalMetric`, the CCZ4 auxiliary variable defined by
     205             :  * `Ccz4::Tags::FieldD`, its spatial derivative, and the CCZ4 identity defined
     206             :  * by `Ccz4::Tags::FieldDUp`.
     207             :  */
     208             : template <typename DataType, size_t Dim, typename Frame>
     209           1 : struct DerivConformalChristoffelSecondKind : db::SimpleTag {
     210           0 :   using type = tnsr::iJkk<DataType, Dim, Frame>;
     211             : };
     212             : 
     213             : /*!
     214             :  * \brief The spatial christoffel symbols of the second kind
     215             :  *
     216             :  * \details We define:
     217             :  * \f{align}
     218             :  *     \Gamma^k_{ij} &= \tilde{\Gamma}^k_{ij} -
     219             :  *         \tilde{\gamma}^{kl} (\tilde{\gamma}_{jl} P_i +
     220             :  *                              \tilde{\gamma}_{il} P_j -
     221             :  *                              \tilde{\gamma}_{ij} P_l)
     222             :  * \f}
     223             :  * where \f$\tilde{\gamma}^{ij}\f$, \f$\tilde{\gamma}_{ij}\f$,
     224             :  * \f$\tilde{\Gamma}^k_{ij}\f$, and \f$P_i\f$ are the conformal spatial metric,
     225             :  * the inverse conformal spatial metric, the conformal spatial christoffel
     226             :  * symbols of the second kind, and the CCZ4 auxiliary variable defined by
     227             :  * `Ccz4::Tags::ConformalMetric`, `Ccz4::Tags::InverseConformalMetric`,
     228             :  * `Ccz4::Tags::ConformalChristoffelSecondKind`, and `Ccz4::Tags::FieldP`,
     229             :  * respectively.
     230             :  */
     231             : template <typename DataType, size_t Dim, typename Frame>
     232           1 : struct ChristoffelSecondKind : db::SimpleTag {
     233           0 :   using type = tnsr::Ijj<DataType, Dim, Frame>;
     234             : };
     235             : 
     236             : /*!
     237             :  * \brief The spatial Ricci tensor
     238             :  *
     239             :  * \details See `Ccz4::spatial_ricci_tensor()` for details.
     240             :  */
     241             : template <typename DataType, size_t Dim, typename Frame>
     242           1 : struct Ricci : db::SimpleTag {
     243           0 :   using type = tnsr::ii<DataType, Dim, Frame>;
     244             : };
     245             : 
     246             : /*!
     247             :  * \brief The gradient of the gradient of the lapse
     248             :  *
     249             :  * \details We define:
     250             :  * \f{align}
     251             :  *     \nabla_i \nabla_j \alpha &= \alpha A_i A_j -
     252             :  *                 \alpha \Gamma^k{}_{ij} A_k + \alpha \partial_{(i} A_{j)}
     253             :  * \f}
     254             :  * where \f$\alpha\f$, \f$\Gamma^k{}_{ij}\f$, \f$A_i\f$, and
     255             :  * \f$\partial_j A_i\f$ are the lapse, spatial christoffel symbols of the second
     256             :  * kind, the CCZ4 auxiliary variable defined by `Ccz4::Tags::FieldA`, and its
     257             :  * spatial derivative, respectively.
     258             :  */
     259             : template <typename DataType, size_t Dim, typename Frame>
     260           1 : struct GradGradLapse : db::SimpleTag {
     261           0 :   using type = tnsr::ij<DataType, Dim, Frame>;
     262             : };
     263             : 
     264             : /*!
     265             :  * \brief The divergence of the lapse
     266             :  *
     267             :  * \details We define:
     268             :  * \f{align}
     269             :  *     \nabla^i \nabla_i \alpha &= \phi^2 \tilde{\gamma}^{ij}
     270             :  *         (\nabla_i \nabla_j \alpha)
     271             :  * \f}
     272             :  * where \f$\phi\f$, \f$\tilde{\gamma}^{ij}\f$, and
     273             :  * \f$\nabla_i \nabla_j \alpha\f$ are the conformal factor, inverse conformal
     274             :  * spatial metric, and the gradient of the gradient of the lapse defined by
     275             :  * `Ccz4::Tags::ConformalFactor`, `Ccz4::Tags::InverseConformalMetric`, and
     276             :  * `Ccz4::Tags::GradGradLapse`, respectively.
     277             :  */
     278             : template <typename DataType>
     279           1 : struct DivergenceLapse : db::SimpleTag {
     280           0 :   using type = Scalar<DataType>;
     281             : };
     282             : 
     283             : /*!
     284             :  * \brief The contraction of the conformal spatial Christoffel symbols of the
     285             :  * second kind
     286             :  *
     287             :  * \details See `Ccz4::contracted_conformal_christoffel_second_kind()` for
     288             :  * details.
     289             :  */
     290             : template <typename DataType, size_t Dim, typename Frame>
     291           1 : struct ContractedConformalChristoffelSecondKind : db::SimpleTag {
     292           0 :   using type = tnsr::I<DataType, Dim, Frame>;
     293             : };
     294             : 
     295             : /*!
     296             :  * \brief The spatial derivative of the contraction of the conformal spatial
     297             :  * Christoffel symbols of the second kind
     298             :  *
     299             :  * \details See `Ccz4::deriv_contracted_conformal_christoffel_second_kind()` for
     300             :  * details.
     301             :  */
     302             : template <typename DataType, size_t Dim, typename Frame>
     303           1 : struct DerivContractedConformalChristoffelSecondKind : db::SimpleTag {
     304           0 :   using type = tnsr::iJ<DataType, Dim, Frame>;
     305             : };
     306             : 
     307             : /*!
     308             :  * \brief The CCZ4 evolved variable \f$\hat{\Gamma}^i\f$
     309             :  *
     310             :  * \details This must satisfy the identity:
     311             :  *
     312             :  * \f{align}
     313             :  *     \hat{\Gamma}^i &= \tilde{\Gamma}^i + 2 \tilde{\gamma}^{ij} Z_j
     314             :  * \f}
     315             :  *
     316             :  * where \f$\tilde{\gamma}^{ij}\f$ is the inverse conformal spatial metric
     317             :  * defined by `Ccz4::Tags::InverseConformalMetric`, \f$Z_i\f$ is the spatial
     318             :  * part of the Z4 constraint defined by `Ccz4::Tags::SpatialZ4Constraint`, and
     319             :  * \f$\tilde{\Gamma}^i\f$ is the contraction of the conformal spatial
     320             :  * christoffel symbols of the second kind defined by
     321             :  * `Ccz4::Tags::ContractedConformalChristoffelSecondKind`.
     322             :  */
     323             : template <typename DataType, size_t Dim, typename Frame>
     324           1 : struct GammaHat : db::SimpleTag {
     325           0 :   using type = tnsr::I<DataType, Dim, Frame>;
     326             : };
     327             : 
     328             : /*!
     329             :  * \brief The spatial part of the Z4 constraint
     330             :  *
     331             :  * \details See `Ccz4::spatial_z4_constraint` for details.
     332             :  */
     333             : template <typename DataType, size_t Dim, typename Frame>
     334           1 : struct SpatialZ4Constraint : db::SimpleTag {
     335           0 :   using type = tnsr::i<DataType, Dim, Frame>;
     336             : };
     337             : 
     338             : /*!
     339             :  * \brief The spatial part of the upper Z4 constraint
     340             :  *
     341             :  * \details See `Ccz4::upper_spatial_z4_constraint` for details.
     342             :  */
     343             : template <typename DataType, size_t Dim, typename Frame>
     344           1 : struct SpatialZ4ConstraintUp : db::SimpleTag {
     345           0 :   using type = tnsr::I<DataType, Dim, Frame>;
     346             : };
     347             : 
     348             : /*!
     349             :  * \brief The gradient of the spatial part of the Z4 constraint
     350             :  *
     351             :  * \details See `Ccz4::grad_spatial_z4_constraint` for details.
     352             :  */
     353             : template <typename DataType, size_t Dim, typename Frame>
     354           1 : struct GradSpatialZ4Constraint : db::SimpleTag {
     355           0 :   using type = tnsr::ij<DataType, Dim, Frame>;
     356             : };
     357             : 
     358             : /*!
     359             :  * \brief The sum of the Ricci scalar and twice the divergence of the upper
     360             :  * spatial Z4 constraint
     361             :  *
     362             :  * \details See `Ccz4::ricci_scalar_plus_divergence_z4_constraint` for details.
     363             :  */
     364             : template <typename DataType>
     365           1 : struct RicciScalarPlusDivergenceZ4Constraint : db::SimpleTag {
     366           0 :   using type = Scalar<DataType>;
     367             : };
     368             : }  // namespace Tags
     369             : 
     370           1 : namespace OptionTags {
     371             : /*!
     372             :  * \ingroup OptionGroupsGroup
     373             :  * Groups option tags related to the CCZ4 evolution system.
     374             :  */
     375           1 : struct Group {
     376           0 :   static std::string name() { return "Ccz4"; }
     377           0 :   static constexpr Options::String help{
     378             :       "Options for the CCZ4 evolution system"};
     379           0 :   using group = evolution::OptionTags::SystemGroup;
     380             : };
     381             : }  // namespace OptionTags
     382             : }  // namespace Ccz4

Generated by: LCOV version 1.14