SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/GeneralRelativity - ProjectionOperators.hpp Hit Total Coverage
Commit: 923cd4a8ea30f5a5589baa60b0a93e358ca9f8e8 Lines: 9 10 90.0 %
Date: 2025-11-07 19:37:56
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/TypeAliases.hpp"
       9             : 
      10             : /// \cond
      11             : namespace gsl {
      12             : template <typename>
      13             : struct not_null;
      14             : }  // namespace gsl
      15             : /// \endcond
      16             : 
      17             : namespace gr {
      18             : 
      19             : /// @{
      20             : /*!
      21             :  * \ingroup GeneralRelativityGroup
      22             :  * \brief Compute projection operator onto an interface
      23             :  *
      24             :  * \details Returns the operator \f$P^{ij} = \gamma^{ij} - n^i n^j\f$,
      25             :  * where \f$\gamma^{ij}\f$ is the inverse spatial metric, and
      26             :  * \f$n^i\f$ is the normal vector to the interface in question.
      27             :  *
      28             :  */
      29             : template <typename DataType, size_t VolumeDim, typename Frame>
      30           1 : tnsr::II<DataType, VolumeDim, Frame> transverse_projection_operator(
      31             :     const tnsr::II<DataType, VolumeDim, Frame>& inverse_spatial_metric,
      32             :     const tnsr::I<DataType, VolumeDim, Frame>& normal_vector);
      33             : 
      34             : template <typename DataType, size_t VolumeDim, typename Frame>
      35           1 : void transverse_projection_operator(
      36             :     gsl::not_null<tnsr::II<DataType, VolumeDim, Frame>*> projection_tensor,
      37             :     const tnsr::II<DataType, VolumeDim, Frame>& inverse_spatial_metric,
      38             :     const tnsr::I<DataType, VolumeDim, Frame>& normal_vector);
      39             : /// @}
      40             : 
      41             : /*!
      42             :  * \ingroup GeneralRelativityGroup
      43             :  * \brief Compute projection operator onto an interface
      44             :  *
      45             :  * \details Returns the operator \f$P_{ij} = \gamma_{ij} - n_i n_j\f$,
      46             :  * where \f$ \gamma_{ij}\f$ is the spatial metric, and \f$ n_i\f$ is
      47             :  * the normal one-form to the interface in question.
      48             :  */
      49             : template <typename DataType, size_t VolumeDim, typename Frame>
      50           1 : tnsr::ii<DataType, VolumeDim, Frame> transverse_projection_operator(
      51             :     const tnsr::ii<DataType, VolumeDim, Frame>& spatial_metric,
      52             :     const tnsr::i<DataType, VolumeDim, Frame>& normal_one_form);
      53             : 
      54             : /*!
      55             :  * \ingroup GeneralRelativityGroup
      56             :  * \brief Compute projection operator onto an interface
      57             :  *
      58             :  * \details Returns the operator \f$P_{ij} = \gamma_{ij} - n_i n_j\f$,
      59             :  * where \f$ \gamma_{ij}\f$ is the spatial metric, and \f$ n_i\f$ is
      60             :  * the normal one-form to the interface in question.
      61             :  */
      62             : template <typename DataType, size_t VolumeDim, typename Frame>
      63             : void transverse_projection_operator(
      64             :     gsl::not_null<tnsr::ii<DataType, VolumeDim, Frame>*> projection_tensor,
      65             :     const tnsr::ii<DataType, VolumeDim, Frame>& spatial_metric,
      66             :     const tnsr::i<DataType, VolumeDim, Frame>& normal_one_form);
      67             : 
      68             : /*!
      69             :  * \ingroup GeneralRelativityGroup
      70             :  * \brief Compute projection operator onto an interface
      71             :  *
      72             :  * \details Returns the operator \f$P^{i}_{j} = \delta^{i}_{j} - n^i n_j\f$,
      73             :  * where \f$n^i\f$ and \f$n_i\f$ are the normal vector and normal one-form
      74             :  * to the interface in question.
      75             :  */
      76             : template <typename DataType, size_t VolumeDim, typename Frame>
      77           1 : tnsr::Ij<DataType, VolumeDim, Frame> transverse_projection_operator(
      78             :     const tnsr::I<DataType, VolumeDim, Frame>& normal_vector,
      79             :     const tnsr::i<DataType, VolumeDim, Frame>& normal_one_form);
      80             : 
      81             : /*!
      82             :  * \ingroup GeneralRelativityGroup
      83             :  * \brief Compute projection operator onto an interface
      84             :  *
      85             :  * \details Returns the operator \f$P^{i}_{j} = \delta^{i}_{j} - n^i n_j\f$,
      86             :  * where \f$n^i\f$ and \f$n_i\f$ are the normal vector and normal one-form
      87             :  * to the interface in question.
      88             :  */
      89             : template <typename DataType, size_t VolumeDim, typename Frame>
      90             : void transverse_projection_operator(
      91             :     gsl::not_null<tnsr::Ij<DataType, VolumeDim, Frame>*> projection_tensor,
      92             :     const tnsr::I<DataType, VolumeDim, Frame>& normal_vector,
      93             :     const tnsr::i<DataType, VolumeDim, Frame>& normal_one_form);
      94             : 
      95             : /// @{
      96             : /*!
      97             :  * \ingroup GeneralRelativityGroup
      98             :  * \brief Compute spacetime projection operator onto an interface
      99             :  *
     100             :  * \details Consider a \f$d-1\f$-dimensional surface \f$S\f$ in a
     101             :  * \f$d\f$-dimensional spatial hypersurface \f$\Sigma\f$. Let \f$s_a\f$
     102             :  * be the unit spacelike one-form orthogonal to \f$S\f$ in \f$\Sigma\f$,
     103             :  * and \f$n_a\f$ be the timelike unit vector orthogonal to \f$\Sigma\f$.
     104             :  * This function returns the projection operator onto \f$S\f$ for
     105             :  * \f$d+1\f$ dimensional quantities:
     106             :  *
     107             :  * \f{align*}
     108             :  * P_{ab} = g_{ab} + n_a n_b - s_a s_b = \gamma_{ab} - s_a s_b.
     109             :  * \f}
     110             :  */
     111             : template <typename DataType, size_t VolumeDim, typename Frame>
     112           1 : tnsr::aa<DataType, VolumeDim, Frame> transverse_projection_operator(
     113             :     const tnsr::aa<DataType, VolumeDim, Frame>& spacetime_metric,
     114             :     const tnsr::a<DataType, VolumeDim, Frame>& spacetime_normal_one_form,
     115             :     const tnsr::i<DataType, VolumeDim, Frame>& interface_unit_normal_one_form);
     116             : 
     117             : template <typename DataType, size_t VolumeDim, typename Frame>
     118           1 : void transverse_projection_operator(
     119             :     gsl::not_null<tnsr::aa<DataType, VolumeDim, Frame>*> projection_tensor,
     120             :     const tnsr::aa<DataType, VolumeDim, Frame>& spacetime_metric,
     121             :     const tnsr::a<DataType, VolumeDim, Frame>& spacetime_normal_one_form,
     122             :     const tnsr::i<DataType, VolumeDim, Frame>& interface_unit_normal_one_form);
     123             : /// @}
     124             : 
     125             : /*!
     126             :  * \ingroup GeneralRelativityGroup
     127             :  * \brief Compute spacetime projection operator onto an interface
     128             :  *
     129             :  * \details Consider a \f$d-1\f$-dimensional surface \f$S\f$ in a
     130             :  * \f$d\f$-dimensional spatial hypersurface \f$\Sigma\f$. Let \f$s^a\f$
     131             :  * be the unit spacelike vector orthogonal to \f$S\f$ in \f$\Sigma\f$,
     132             :  * and \f$n^a\f$ be the timelike unit vector orthogonal to \f$\Sigma\f$.
     133             :  * This function returns the projection operator onto \f$S\f$ for
     134             :  * \f$d+1\f$ dimensional quantities:
     135             :  *
     136             :  * \f{align*}
     137             :  * P^{ab} = g^{ab} + n^a n^b - s^a s^b = \gamma_{ab} - s_a s_b.
     138             :  * \f}
     139             :  */
     140             : template <typename DataType, size_t VolumeDim, typename Frame>
     141           1 : tnsr::AA<DataType, VolumeDim, Frame> transverse_projection_operator(
     142             :     const tnsr::AA<DataType, VolumeDim, Frame>& inverse_spacetime_metric,
     143             :     const tnsr::A<DataType, VolumeDim, Frame>& spacetime_normal_vector,
     144             :     const tnsr::I<DataType, VolumeDim, Frame>& interface_unit_normal_vector);
     145             : 
     146             : /*!
     147             :  * \ingroup GeneralRelativityGroup
     148             :  * \brief Compute spacetime projection operator onto an interface
     149             :  *
     150             :  * \details Consider a \f$d-1\f$-dimensional surface \f$S\f$ in a
     151             :  * \f$d\f$-dimensional spatial hypersurface \f$\Sigma\f$. Let \f$s^a\f$
     152             :  * be the unit spacelike vector orthogonal to \f$S\f$ in \f$\Sigma\f$,
     153             :  * and \f$n^a\f$ be the timelike unit vector orthogonal to \f$\Sigma\f$.
     154             :  * This function returns the projection operator onto \f$S\f$ for
     155             :  * \f$d+1\f$ dimensional quantities:
     156             :  *
     157             :  * \f{align*}
     158             :  * P^{ab} = g^{ab} + n^a n^b - s^a s^b = \gamma_{ab} - s_a s_b.
     159             :  * \f}
     160             :  */
     161             : template <typename DataType, size_t VolumeDim, typename Frame>
     162             : void transverse_projection_operator(
     163             :     gsl::not_null<tnsr::AA<DataType, VolumeDim, Frame>*> projection_tensor,
     164             :     const tnsr::AA<DataType, VolumeDim, Frame>& inverse_spacetime_metric,
     165             :     const tnsr::A<DataType, VolumeDim, Frame>& spacetime_normal_vector,
     166             :     const tnsr::I<DataType, VolumeDim, Frame>& interface_unit_normal_vector);
     167             : 
     168             : /// @{
     169             : /*!
     170             :  * \ingroup GeneralRelativityGroup
     171             :  * \brief Compute spacetime projection operator onto an interface
     172             :  *
     173             :  * \details Consider a \f$d-1\f$-dimensional surface \f$S\f$ in a
     174             :  * \f$d\f$-dimensional spatial hypersurface \f$\Sigma\f$. Let \f$s^a\f$
     175             :  * \f$(s_a)\f$ be the unit spacelike vector (one-form) orthogonal
     176             :  * to \f$S\f$ in \f$\Sigma\f$, and \f$n^a\f$ \f$(n_a)\f$ be the timelike
     177             :  * unit vector (one-form) orthogonal to \f$\Sigma\f$. This function
     178             :  * returns the projection operator onto \f$S\f$ for \f$d+1\f$ dimensional
     179             :  * quantities:
     180             :  *
     181             :  * \f{align*}
     182             :  * P^a_b = \delta^a_b + n^a n_b - s^a s_b.
     183             :  * \f}
     184             :  */
     185             : template <typename DataType, size_t VolumeDim, typename Frame>
     186           1 : tnsr::Ab<DataType, VolumeDim, Frame> transverse_projection_operator(
     187             :     const tnsr::A<DataType, VolumeDim, Frame>& spacetime_normal_vector,
     188             :     const tnsr::a<DataType, VolumeDim, Frame>& spacetime_normal_one_form,
     189             :     const tnsr::I<DataType, VolumeDim, Frame>& interface_unit_normal_vector,
     190             :     const tnsr::i<DataType, VolumeDim, Frame>& interface_unit_normal_one_form);
     191             : 
     192             : template <typename DataType, size_t VolumeDim, typename Frame>
     193           1 : void transverse_projection_operator(
     194             :     gsl::not_null<tnsr::Ab<DataType, VolumeDim, Frame>*> projection_tensor,
     195             :     const tnsr::A<DataType, VolumeDim, Frame>& spacetime_normal_vector,
     196             :     const tnsr::a<DataType, VolumeDim, Frame>& spacetime_normal_one_form,
     197             :     const tnsr::I<DataType, VolumeDim, Frame>& interface_unit_normal_vector,
     198             :     const tnsr::i<DataType, VolumeDim, Frame>& interface_unit_normal_one_form);
     199             : /// @}
     200             : }  // namespace gr

Generated by: LCOV version 1.14