SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/ScalarTensor - DoubleCovariantDerivativeOfScalar.hpp Hit Total Coverage
Commit: c3e43f8d41800b0ecefb9d1393f1de1d5a280c8f Lines: 6 7 85.7 %
Date: 2026-07-24 22:09:25
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 "DataStructures/Tensor/Tensor.hpp"
       7             : #include "Utilities/Gsl.hpp"
       8             : 
       9             : namespace ScalarTensor {
      10             : /// @{
      11             : /*!
      12             :  * \brief Normal projection of the second covariant derivative of the scalar
      13             :  * field.
      14             :  *
      15             :  * \details Computes the term
      16             :  * \begin{equation}
      17             :  *   n^a n^b \nabla_a \nabla_b \Psi = - \frac{1}{\alpha} \Bigl[ \partial_t \Pi
      18             :  *      - \beta^i \partial_i \Pi
      19             :  *      + \Phi^i \partial_i \alpha \Bigr],
      20             :  * \end{equation}
      21             :  * where $\Psi$ is the scalar field, $\Pi$ is its conjugate momentum and
      22             :  * $\Phi_i = \partial_i \Psi$; $n^a$ is the unit vector normal to the spatial
      23             :  * hypersurfaces, while $\alpha$ is the lapse and $\beta^i$ is the shift vector.
      24             :  */
      25             : template <typename DataType, typename Frame>
      26           1 : void DDKG_normal_normal_projection(
      27             :     gsl::not_null<Scalar<DataType>*> DDKG_normal_normal_result,
      28             :     const Scalar<DataType>& lapse, const tnsr::I<DataType, 3, Frame>& shift,
      29             :     const tnsr::II<DataType, 3, Frame>& inverse_spatial_metric,
      30             :     const tnsr::i<DataType, 3, Frame>& phi_scalar,
      31             :     const tnsr::i<DataType, 3, Frame>& d_pi_scalar,
      32             :     const Scalar<DataType>& dt_pi_scalar,
      33             :     const tnsr::i<DataType, 3, Frame>& d_lapse);
      34             : 
      35             : template <typename DataType, typename Frame>
      36           1 : Scalar<DataType> DDKG_normal_normal_projection(
      37             :     const Scalar<DataType>& lapse, const tnsr::I<DataType, 3, Frame>& shift,
      38             :     const tnsr::II<DataType, 3, Frame>& inverse_spatial_metric,
      39             :     const tnsr::i<DataType, 3, Frame>& phi_scalar,
      40             :     const tnsr::i<DataType, 3, Frame>& d_pi_scalar,
      41             :     const Scalar<DataType>& dt_pi_scalar,
      42             :     const tnsr::i<DataType, 3, Frame>& d_lapse);
      43             : /// @}
      44             : 
      45             : /// @{
      46             : /*!
      47             :  * \brief Mixed projection of the second covariant derivative of the scalar
      48             :  * field.
      49             :  *
      50             :  * \details Computes the term
      51             :  * \begin{equation}
      52             :  *   \gamma^a_i n^b \nabla_a \nabla_b \Psi
      53             :  *     = - \partial_i \Pi + K_{ij} \Phi^j,
      54             :  * \end{equation}
      55             :  * where $\Psi$ is the scalar field, $\Pi$ is its conjugate momentum and
      56             :  * $\Phi_i = \partial_i \Psi$; $n^a$ is the unit vector normal to the spatial
      57             :  * hypersurfaces, $\gamma^a_b = \delta^a_b + n^a n_b$ is the projection operator
      58             :  * onto them and $K_{ij}$ is the extrinsic curvature.
      59             :  */
      60             : template <typename DataType, typename Frame>
      61           1 : void DDKG_normal_spatial_projection(
      62             :     gsl::not_null<tnsr::i<DataType, 3, Frame>*> DDKG_normal_spatial_result,
      63             :     const tnsr::II<DataType, 3, Frame>& inverse_spatial_metric,
      64             :     const tnsr::ii<DataType, 3, Frame>& extrinsic_curvature,
      65             :     const tnsr::i<DataType, 3, Frame>& phi_scalar,
      66             :     const tnsr::i<DataType, 3, Frame>& d_pi_scalar);
      67             : 
      68             : template <typename DataType, typename Frame>
      69           1 : tnsr::i<DataType, 3, Frame> DDKG_normal_spatial_projection(
      70             :     const tnsr::II<DataType, 3, Frame>& inverse_spatial_metric,
      71             :     const tnsr::ii<DataType, 3, Frame>& extrinsic_curvature,
      72             :     const tnsr::i<DataType, 3, Frame>& phi_scalar,
      73             :     const tnsr::i<DataType, 3, Frame>& d_pi_scalar);
      74             : /// @}
      75             : 
      76             : /// @{
      77             : /*!
      78             :  * \brief Spatial projection of the second covariant derivative of the scalar
      79             :  * field.
      80             :  *
      81             :  * \details Computes the term
      82             :  * \begin{equation}
      83             :  *   \gamma^a_i \gamma^b_j \nabla_a \nabla_b \Psi =
      84             :  *     - \Pi K_{ij} + D_{(i} \Phi_{j)},
      85             :  * \end{equation}
      86             :  * where $\Psi$ is the scalar field, $\Pi$ is its conjugate momentum and
      87             :  * $\Phi_i = \partial_i \Psi$; $n^a$ is the unit vector normal to the spatial
      88             :  * hypersurfaces and $\gamma^a_b = \delta^a_b + n^a n_b$ is the projection
      89             :  * operator onto them; $K_{ij}$ is the extrinsic curvature and $D_i$ is the
      90             :  * covariant derivative with respect to the spatial metric.
      91             :  */
      92             : template <typename DataType, typename Frame>
      93           1 : void DDKG_spatial_spatial_projection(
      94             :     gsl::not_null<tnsr::ii<DataType, 3, Frame>*> DDKG_spatial_spatial_result,
      95             :     const tnsr::ii<DataType, 3, Frame>& extrinsic_curvature,
      96             :     const tnsr::Ijj<DataType, 3, Frame>& spatial_christoffel_second_kind,
      97             :     const Scalar<DataType>& pi_scalar,
      98             :     const tnsr::i<DataType, 3, Frame>& phi_scalar,
      99             :     const tnsr::ij<DataType, 3, Frame>& d_phi_scalar);
     100             : 
     101             : template <typename DataType, typename Frame>
     102           1 : tnsr::ii<DataType, 3, Frame> DDKG_spatial_spatial_projection(
     103             :     const tnsr::ii<DataType, 3, Frame>& extrinsic_curvature,
     104             :     const tnsr::Ijj<DataType, 3, Frame>& spatial_christoffel_second_kind,
     105             :     const Scalar<DataType>& pi_scalar,
     106             :     const tnsr::i<DataType, 3, Frame>& phi_scalar,
     107             :     const tnsr::ij<DataType, 3, Frame>& d_phi_scalar);
     108             : /// @}
     109             : }  // namespace ScalarTensor

Generated by: LCOV version 1.14