SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/ScalarGaussBonnet - ScalarMomentum.hpp Hit Total Coverage
Commit: a8efe75339f4781ca06d43fed14c40144d5e8a08 Lines: 3 8 37.5 %
Date: 2024-10-17 21:19:21
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 1.14