SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/Xcts - LongitudinalOperator.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 80.0 % 5 4
Test Date: 2026-10-22 17:29:42
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              : 
       8              : #include "DataStructures/Tensor/Tensor.hpp"
       9              : #include "Utilities/Gsl.hpp"
      10              : 
      11              : namespace Xcts {
      12              : /// @{
      13              : /*!
      14              :  * \brief The longitudinal operator, or vector gradient, \f$(L\beta)^{ij}\f$
      15              :  *
      16              :  * Computes the longitudinal operator
      17              :  *
      18              :  * \f{equation}
      19              :  * (L\beta)^{ij} = \nabla^i \beta^j + \nabla^j \beta^i -
      20              :  * \frac{2}{3}\gamma^{ij}\nabla_k\beta^k
      21              :  * \f}
      22              :  *
      23              :  * of a vector field \f$\beta^i\f$, where \f$\nabla\f$ denotes the covariant
      24              :  * derivative w.r.t. the metric \f$\gamma\f$ (see e.g. Eq. (3.50) in
      25              :  * \cite BaumgarteShapiro). Note that in the XCTS equations the longitudinal
      26              :  * operator is typically applied to conformal quantities and w.r.t. the
      27              :  * conformal metric \f$\bar{\gamma}\f$.
      28              :  *
      29              :  * In terms of the symmetric "strain" quantity
      30              :  * \f$B_{ij}=\nabla_{(i}\gamma_{j)k}\beta^k\f$ the longitudinal operator is:
      31              :  *
      32              :  * \f{equation}
      33              :  * (L\beta)^{ij} = 2\left(\gamma^{ik}\gamma^{jl} -
      34              :  * \frac{1}{3} \gamma^{ij}\gamma^{kl}\right) B_{kl}
      35              :  * \f}
      36              :  *
      37              :  * Note that the strain can be computed with `Elasticity::strain`.
      38              :  */
      39              : template <typename DataType>
      40            1 : void longitudinal_operator(gsl::not_null<tnsr::II<DataType, 3>*> result,
      41              :                            const tnsr::ii<DataType, 3>& strain,
      42              :                            const tnsr::II<DataType, 3>& inv_metric);
      43              : 
      44              : template <typename DataType>
      45            1 : void longitudinal_operator(
      46              :     gsl::not_null<tnsr::II<DataType, 3>*> result,
      47              :     const tnsr::I<DataType, 3>& shift, const tnsr::iJ<DataType, 3>& deriv_shift,
      48              :     const tnsr::II<DataType, 3>& inv_metric,
      49              :     const tnsr::Ijj<DataType, 3>& christoffel_second_kind);
      50              : /// @}
      51              : 
      52              : /// @{
      53              : /*!
      54              :  * \brief The conformal longitudinal operator \f$(L\beta)^{ij}\f$ on a flat
      55              :  * conformal metric in Cartesian coordinates \f$\gamma_{ij}=\delta_{ij}\f$
      56              :  *
      57              :  * \see `Xcts::longitudinal_operator`
      58              :  */
      59              : template <typename DataType>
      60            1 : void longitudinal_operator_flat_cartesian(
      61              :     gsl::not_null<tnsr::II<DataType, 3>*> result,
      62              :     const tnsr::ii<DataType, 3>& strain);
      63              : 
      64              : template <typename DataType>
      65            1 : void longitudinal_operator_flat_cartesian(
      66              :     gsl::not_null<tnsr::II<DataType, 3>*> result,
      67              :     const tnsr::iJ<DataType, 3>& deriv_shift);
      68              : /// @}
      69              : }  // namespace Xcts
        

Generated by: LCOV version 2.0-1