SpECTRE Documentation Coverage Report
Current view: top level - Elliptic/Systems/Xcts - Tags.hpp Hit Total Coverage
Commit: 9478b377b8678e85031859810205323c5f2fef1d Lines: 19 37 51.4 %
Date: 2024-05-08 02:31:17
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/Tag.hpp"
       9             : #include "DataStructures/Tensor/TypeAliases.hpp"
      10             : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
      11             : #include "PointwiseFunctions/GeneralRelativity/Tags/Conformal.hpp"
      12             : 
      13             : namespace Xcts {
      14             : /// Tags related to the XCTS equations
      15             : namespace Tags {
      16             : 
      17             : /*!
      18             :  * \brief The conformal factor \f$\psi(x)\f$ that rescales the spatial metric
      19             :  * \f$\gamma_{ij}=\psi^4\bar{\gamma}_{ij}\f$.
      20             :  */
      21             : template <typename DataType>
      22           1 : struct ConformalFactor : db::SimpleTag {
      23           0 :   using type = Scalar<DataType>;
      24             : };
      25             : 
      26             : /*!
      27             :  * \brief The conformal factor minus one \f$\psi(x) - 1\f$. Useful as dynamic
      28             :  * variable in formulations of the XCTS equations because it approaches zero at
      29             :  * spatial infinity rather than one, hence derivatives may be more accurate.
      30             :  */
      31             : template <typename DataType>
      32           1 : struct ConformalFactorMinusOne : db::SimpleTag {
      33           0 :   using type = Scalar<DataType>;
      34             : };
      35             : 
      36             : /*!
      37             :  * \brief The conformally scaled spatial metric
      38             :  * \f$\bar{\gamma}_{ij}=\psi^{-4}\gamma_{ij}\f$, where \f$\psi\f$ is the
      39             :  * `Xcts::Tags::ConformalFactor` and \f$\gamma_{ij}\f$ is the
      40             :  * `gr::Tags::SpatialMetric`
      41             :  */
      42             : template <typename DataType, size_t Dim, typename Frame>
      43           1 : using ConformalMetric =
      44             :     gr::Tags::Conformal<gr::Tags::SpatialMetric<DataType, Dim, Frame>, -4>;
      45             : 
      46             : /*!
      47             :  * \brief The conformally scaled inverse spatial metric
      48             :  * \f$\bar{\gamma}^{ij}=\psi^{4}\gamma^{ij}\f$, where \f$\psi\f$ is the
      49             :  * `Xcts::Tags::ConformalFactor` and \f$\gamma^{ij}\f$ is the
      50             :  * `gr::Tags::InverseSpatialMetric`
      51             :  */
      52             : template <typename DataType, size_t Dim, typename Frame>
      53           1 : using InverseConformalMetric =
      54             :     gr::Tags::Conformal<gr::Tags::InverseSpatialMetric<DataType, Dim, Frame>,
      55             :                         4>;
      56             : 
      57             : /*!
      58             :  * \brief The product of lapse \f$\alpha(x)\f$ and conformal factor
      59             :  * \f$\psi(x)\f$
      60             :  *
      61             :  * This quantity is commonly used in formulations of the XCTS equations.
      62             :  */
      63             : template <typename DataType>
      64           1 : struct LapseTimesConformalFactor : db::SimpleTag {
      65           0 :   using type = Scalar<DataType>;
      66             : };
      67             : 
      68             : /*!
      69             :  * \brief The lapse times the conformal factor minus one \f$\alpha \psi - 1\f$.
      70             :  *
      71             :  * \see `Xcts::Tags::ConformalFactorMinusOne`
      72             :  */
      73             : template <typename DataType>
      74           1 : struct LapseTimesConformalFactorMinusOne : db::SimpleTag {
      75           0 :   using type = Scalar<DataType>;
      76             : };
      77             : 
      78             : /*!
      79             :  * \brief The constant part \f$\beta^i_\mathrm{background}\f$ of the shift
      80             :  * \f$\beta^i=\beta^i_\mathrm{background} + \beta^i_\mathrm{excess}\f$
      81             :  *
      82             :  * \see `Xcts::Tags::ShiftExcess`
      83             :  */
      84             : template <typename DataType, size_t Dim, typename Frame>
      85           1 : struct ShiftBackground : db::SimpleTag {
      86           0 :   using type = tnsr::I<DataType, Dim, Frame>;
      87             : };
      88             : 
      89             : /*!
      90             :  * \brief The dynamic part \f$\beta^i_\mathrm{excess}\f$ of the shift
      91             :  * \f$\beta^i=\beta^i_\mathrm{background} + \beta^i_\mathrm{excess}\f$
      92             :  *
      93             :  * We commonly split off the part of the shift that diverges at large coordinate
      94             :  * distances (the "background" shift \f$\beta^i_\mathrm{background}\f$) and
      95             :  * solve only for the remainder (the "excess" shift
      96             :  * \f$\beta^i_\mathrm{excess}\f$). For example, the background shift might be a
      97             :  * uniform rotation \f$\beta^i_\mathrm{background}=(-\Omega y, \Omega x, 0)\f$
      98             :  * with angular velocity \f$\Omega\f$ around the z-axis, given here in Cartesian
      99             :  * coordinates.
     100             :  *
     101             :  * \see `Xcts::Tags::Background`
     102             :  */
     103             : template <typename DataType, size_t Dim, typename Frame>
     104           1 : struct ShiftExcess : db::SimpleTag {
     105           0 :   using type = tnsr::I<DataType, Dim, Frame>;
     106             : };
     107             : 
     108             : /*!
     109             :  * \brief The symmetric "strain" of the shift vector
     110             :  * \f$B_{ij} = \bar{D}_{(i}\bar{\gamma}_{j)k}\beta^k =
     111             :  * \left(\partial_{(i}\bar{\gamma}_{j)k} - \bar{\Gamma}_{kij}\right)\beta^k\f$
     112             :  *
     113             :  * This quantity is used in our formulations of the XCTS equations.
     114             :  *
     115             :  * Note that the shift is not a conformal quantity, so its index is generally
     116             :  * raised and lowered with the spatial metric, not with the conformal metric.
     117             :  * However, to compute this "strain" we use the conformal metric as defined
     118             :  * above. The conformal longitudinal shift in terms of this quantity is then:
     119             :  *
     120             :  * \f{equation}
     121             :  * (\bar{L}\beta)^{ij} = 2\left(\bar{\gamma}^{ik}\bar{\gamma}^{jl}
     122             :  * - \frac{1}{3}\bar{\gamma}^{ij}\bar{\gamma}^{kl}\right) B_{kl}
     123             :  * \f}
     124             :  *
     125             :  * Note that the conformal longitudinal shift is (minus) the "stress" quantity
     126             :  * of a linear elasticity system in which the shift takes the role of the
     127             :  * displacement vector and the definition of its "strain" remains the same. This
     128             :  * auxiliary elasticity system is formulated on an isotropic constitutive
     129             :  * relation based on the conformal metric with vanishing bulk modulus \f$K=0\f$
     130             :  * (not to be confused with the extrinsic curvature trace \f$K\f$ in this
     131             :  * context) and unit shear modulus \f$\mu=1\f$. See the
     132             :  * `Elasticity::FirstOrderSystem` and the
     133             :  * `Elasticity::ConstitutiveRelations::IsotropicHomogeneous` for details.
     134             :  */
     135             : template <typename DataType, size_t Dim, typename Frame>
     136           1 : struct ShiftStrain : db::SimpleTag {
     137           0 :   using type = tnsr::ii<DataType, Dim, Frame>;
     138             : };
     139             : 
     140             : /*!
     141             :  * \brief The conformal longitudinal operator applied to the shift excess
     142             :  * \f$(\bar{L}\beta_\mathrm{excess})^{ij}\f$
     143             :  *
     144             :  * This quantity can be used as the "flux" for the momentum constraint in
     145             :  * formulations of the XCTS equations, because the principal part of the
     146             :  * momentum constraint is essentially the divergence of this quantity.
     147             :  */
     148             : template <typename DataType, size_t Dim, typename Frame>
     149           1 : struct LongitudinalShiftExcess : db::SimpleTag {
     150           0 :   using type = tnsr::II<DataType, Dim, Frame>;
     151             : };
     152             : 
     153             : /*!
     154             :  * \brief The conformal longitudinal operator applied to the background shift
     155             :  * vector minus the time derivative of the conformal metric
     156             :  * \f$(\bar{L}\beta_\mathrm{background})^{ij} - \bar{u}^{ij}\f$
     157             :  *
     158             :  * This quantity appears in formulation of the XCTS equations (see `Xcts`) and
     159             :  * serves to specify their free data \f$\bar{u}_{ij}\f$. It is combined with the
     160             :  * longitudinal background shift because the two quantities are degenerate.
     161             :  *
     162             :  * \note As usual for conformal quantities, the indices here are raised with the
     163             :  * conformal metric: \f$\bar{u}^{ij} = \bar{\gamma}^{ik}\bar{\gamma}^{jl}
     164             :  * \partial_t\bar{\gamma}_{kl}\f$.
     165             :  *
     166             :  * \see `Xcts::Tags::ShiftBackground`
     167             :  */
     168             : template <typename DataType, size_t Dim, typename Frame>
     169           1 : struct LongitudinalShiftBackgroundMinusDtConformalMetric : db::SimpleTag {
     170           0 :   using type = tnsr::II<DataType, Dim, Frame>;
     171             : };
     172             : 
     173             : /*!
     174             :  * \brief The conformal longitudinal operator applied to the shift vector minus
     175             :  * the time derivative of the conformal metric, squared:
     176             :  * \f$\left((\bar{L}\beta)^{ij} - \bar{u}^{ij}\right)
     177             :  * \left((\bar{L}\beta)_{ij} - \bar{u}_{ij}\right)\f$
     178             :  */
     179             : template <typename DataType>
     180           1 : struct LongitudinalShiftMinusDtConformalMetricSquare : db::SimpleTag {
     181           0 :   using type = Scalar<DataType>;
     182             : };
     183             : 
     184             : /*!
     185             :  * \brief The conformal longitudinal operator applied to the shift vector minus
     186             :  * the time derivative of the conformal metric, squared and divided by the
     187             :  * square of the lapse:
     188             :  * \f$\frac{1}{\alpha^2}\left((\bar{L}\beta)^{ij} - \bar{u}^{ij}\right)
     189             :  * \left((\bar{L}\beta)_{ij} - \bar{u}_{ij}\right)\f$
     190             :  */
     191             : template <typename DataType>
     192           1 : struct LongitudinalShiftMinusDtConformalMetricOverLapseSquare : db::SimpleTag {
     193           0 :   using type = Scalar<DataType>;
     194             : };
     195             : 
     196             : /*!
     197             :  * \brief The shift vector contracted with the gradient of the trace of the
     198             :  * extrinsic curvature: \f$\beta^i\partial_i K\f$
     199             :  *
     200             :  * The shift vector in this quantity is the full shift
     201             :  * \f$\beta^i=\beta^i_\mathrm{background}+\beta^i_\mathrm{excess}\f$ (see
     202             :  * `Xcts::Tags::ShiftExcess` for details on this split).
     203             :  */
     204             : template <typename DataType>
     205           1 : struct ShiftDotDerivExtrinsicCurvatureTrace : db::SimpleTag {
     206           0 :   using type = Scalar<DataType>;
     207             : };
     208             : 
     209             : /*!
     210             :  * \brief The Christoffel symbols of the first kind related to the conformal
     211             :  * metric \f$\bar{\gamma}_{ij}\f$
     212             :  */
     213             : template <typename DataType, size_t Dim, typename Frame>
     214           1 : struct ConformalChristoffelFirstKind : db::SimpleTag {
     215           0 :   using type = tnsr::ijj<DataType, Dim, Frame>;
     216             : };
     217             : 
     218             : /*!
     219             :  * \brief The Christoffel symbols of the second kind related to the conformal
     220             :  * metric \f$\bar{\gamma}_{ij}\f$
     221             :  */
     222             : template <typename DataType, size_t Dim, typename Frame>
     223           1 : struct ConformalChristoffelSecondKind : db::SimpleTag {
     224           0 :   using type = tnsr::Ijj<DataType, Dim, Frame>;
     225             : };
     226             : 
     227             : /*!
     228             :  * \brief The Christoffel symbols of the second kind (related to the conformal
     229             :  * metric \f$\bar{\gamma}_{ij}\f$) contracted in their first two indices:
     230             :  * \f$\bar{\Gamma}_k = \bar{\Gamma}^{i}_{ik}\f$
     231             :  */
     232             : template <typename DataType, size_t Dim, typename Frame>
     233           1 : struct ConformalChristoffelContracted : db::SimpleTag {
     234           0 :   using type = tnsr::i<DataType, Dim, Frame>;
     235             : };
     236             : 
     237             : /*!
     238             :  * \brief The Ricci tensor related to the conformal metric
     239             :  * \f$\bar{\gamma}_{ij}\f$
     240             :  */
     241             : template <typename DataType, size_t Dim, typename Frame>
     242           1 : struct ConformalRicciTensor : db::SimpleTag {
     243           0 :   using type = tnsr::ii<DataType, Dim, Frame>;
     244             : };
     245             : 
     246             : /*!
     247             :  * \brief The Ricci scalar related to the conformal metric
     248             :  * \f$\bar{\gamma}_{ij}\f$
     249             :  */
     250             : template <typename DataType>
     251           1 : struct ConformalRicciScalar : db::SimpleTag {
     252           0 :   using type = Scalar<DataType>;
     253             : };
     254             : 
     255             : }  // namespace Tags
     256             : }  // namespace Xcts

Generated by: LCOV version 1.14