SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/GeneralRelativity - SpacetimeNormalOneForm.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 37.5 % 8 3
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/DataBox/Tag.hpp"
       9              : #include "DataStructures/Tensor/TypeAliases.hpp"
      10              : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
      11              : #include "Utilities/Gsl.hpp"
      12              : #include "Utilities/TMPL.hpp"
      13              : 
      14              : /// \ingroup GeneralRelativityGroup
      15              : /// Holds functions related to general relativity.
      16              : namespace gr {
      17              : /// @{
      18              : /*!
      19              :  * \brief Computes spacetime normal one-form from lapse.
      20              :  *
      21              :  * \details If \f$\alpha\f$ is the lapse, then
      22              :  *
      23              :  * \f{align}
      24              :  *     n_t &= - \alpha \\
      25              :  *     n_i &= 0
      26              :  * \f}
      27              :  *
      28              :  * is computed.
      29              :  */
      30              : template <typename DataType, size_t SpatialDim, typename Frame>
      31            1 : void spacetime_normal_one_form(
      32              :     gsl::not_null<tnsr::a<DataType, SpatialDim, Frame>*> normal_one_form,
      33              :     const Scalar<DataType>& lapse);
      34              : 
      35              : template <typename DataType, size_t SpatialDim, typename Frame>
      36            1 : tnsr::a<DataType, SpatialDim, Frame> spacetime_normal_one_form(
      37              :     const Scalar<DataType>& lapse);
      38              : /// @}
      39              : 
      40              : namespace Tags {
      41              : /*!
      42              :  * \brief Compute item for spacetime normal oneform \f$n_a\f$ from
      43              :  * the lapse \f$\alpha\f$.
      44              :  *
      45              :  * \details Can be retrieved using `gr::Tags::SpacetimeNormalOneForm`.
      46              :  */
      47              : template <typename DataType, size_t SpatialDim, typename Frame>
      48            1 : struct SpacetimeNormalOneFormCompute
      49              :     : SpacetimeNormalOneForm<DataType, SpatialDim, Frame>,
      50              :       db::ComputeTag {
      51            0 :   using argument_tags = tmpl::list<Lapse<DataType>>;
      52              : 
      53            0 :   using return_type = tnsr::a<DataType, SpatialDim, Frame>;
      54              : 
      55            0 :   static constexpr auto function =
      56              :       static_cast<void (*)(gsl::not_null<tnsr::a<DataType, SpatialDim, Frame>*>,
      57              :                            const Scalar<DataType>&)>(
      58              :           &spacetime_normal_one_form<DataType, SpatialDim, Frame>);
      59              : 
      60            0 :   using base = SpacetimeNormalOneForm<DataType, SpatialDim, Frame>;
      61              : };
      62              : }  // namespace Tags
      63              : }  // namespace gr
        

Generated by: LCOV version 2.0-1