SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/ScalarTensor/Xcts - ScalarMomentum.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 "Elliptic/Systems/ScalarGaussBonnet/Tags.hpp"
      10              : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
      11              : 
      12              : namespace sgb {
      13              : /// @{
      14              : /*!
      15              :  * \brief Compute the momentum $\Pi$ assuming quasi-stationarity in sGB gravity.
      16              :  *
      17              :  * This expression can be obtained by simply demanding $\partial_t \Psi = 0$,
      18              :  * yielding
      19              :  *
      20              :  * \begin{equation}
      21              :  * \Pi \equiv -n^{a} \partial_a = \alpha^{-1} \beta^{i} \partial_i \Psi
      22              :  * \end{equation}
      23              :  */
      24              : 
      25            1 : void scalar_momentum(gsl::not_null<Scalar<DataVector>*> result,
      26              :                      const tnsr::i<DataVector, 3, Frame::Inertial>& deriv,
      27              :                      const tnsr::I<DataVector, 3>& shift,
      28              :                      const Scalar<DataVector>& lapse);
      29              : 
      30            1 : Scalar<DataVector> scalar_momentum(
      31              :     const tnsr::i<DataVector, 3, Frame::Inertial>& deriv,
      32              :     const tnsr::I<DataVector, 3>& shift, const Scalar<DataVector>& lapse);
      33              : /// @{
      34              : 
      35              : namespace Tags {
      36              : 
      37              : /*!
      38              :  * \brief Re-compute the momentum Pi, assuming quasi-stationarity.
      39              :  */
      40              : template <typename ShiftTag, typename OutputTag>
      41            1 : struct PiCompute : OutputTag, db::ComputeTag {
      42              :  public:
      43            0 :   using base = OutputTag;
      44            0 :   using return_type = typename base::type;
      45            0 :   static constexpr auto function =
      46              :       static_cast<void (*)(gsl::not_null<return_type*>,
      47              :                            const tnsr::i<DataVector, 3, Frame::Inertial>&,
      48              :                            const tnsr::I<DataVector, 3>&,
      49              :                            const Scalar<DataVector>&)>(&scalar_momentum);
      50            0 :   using argument_tags =
      51              :       tmpl::list<::Tags::deriv<Psi, tmpl::size_t<3>, Frame::Inertial>, ShiftTag,
      52              :                  gr::Tags::Lapse<DataVector>>;
      53              : };
      54              : 
      55              : }  // namespace Tags
      56              : }  // namespace sgb
        

Generated by: LCOV version 2.0-1