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

Generated by: LCOV version 1.14