SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic - ConstraintGammas.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 18.8 % 16 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/Prefixes.hpp"
       9              : #include "DataStructures/DataBox/Tag.hpp"
      10              : #include "DataStructures/DataVector.hpp"
      11              : #include "DataStructures/Tensor/EagerMath/DotProduct.hpp"
      12              : #include "DataStructures/Tensor/Tensor.hpp"
      13              : #include "Domain/FunctionsOfTime/Tags.hpp"
      14              : #include "Evolution/Systems/GeneralizedHarmonic/Tags.hpp"
      15              : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/ConstraintDampingTags.hpp"
      16              : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
      17              : #include "Utilities/ContainerHelpers.hpp"
      18              : #include "Utilities/Gsl.hpp"
      19              : #include "Utilities/TMPL.hpp"
      20              : 
      21              : /// \cond
      22              : namespace Tags {
      23              : struct Time;
      24              : }  // namespace Tags
      25              : namespace domain {
      26              : namespace Tags {
      27              : template <size_t Dim, typename Frame>
      28              : struct Coordinates;
      29              : }  // namespace Tags
      30              : }  // namespace domain
      31              : class DataVector;
      32              : template <typename X, typename Symm, typename IndexList>
      33              : class Tensor;
      34              : /// \endcond
      35              : 
      36              : namespace gh::Tags {
      37              : /*!
      38              :  * \brief Computes the constraint damping parameter \f$\gamma_0\f$ from the
      39              :  * coordinates and a DampingFunction.
      40              :  *
      41              :  * \details Can be retrieved using
      42              :  * `gh::Tags::ConstraintGamma0`.
      43              :  */
      44              : template <size_t SpatialDim, typename Frame>
      45            1 : struct ConstraintGamma0Compute : ConstraintGamma0, db::ComputeTag {
      46            0 :   using argument_tags =
      47              :       tmpl::list<DampingFunctionGamma0<SpatialDim, Frame>,
      48              :                  domain::Tags::Coordinates<SpatialDim, Frame>, ::Tags::Time,
      49              :                  ::domain::Tags::FunctionsOfTime>;
      50            0 :   using return_type = Scalar<DataVector>;
      51              : 
      52            0 :   static constexpr void function(
      53              :       const gsl::not_null<Scalar<DataVector>*> gamma,
      54              :       const ::ConstraintDamping::DampingFunction<SpatialDim, Frame>&
      55              :           damping_function,
      56              :       const tnsr::I<DataVector, SpatialDim, Frame>& coords, const double time,
      57              :       const std::unordered_map<
      58              :           std::string,
      59              :           std::unique_ptr<domain::FunctionsOfTime::FunctionOfTime>>&
      60              :           functions_of_time) {
      61              :     damping_function(gamma, coords, time, functions_of_time);
      62              :   }
      63              : 
      64            0 :   using base = ConstraintGamma0;
      65              : };
      66              : 
      67              : /*!
      68              :  * \brief Computes the constraint damping parameter \f$\gamma_1\f$ from the
      69              :  * coordinates and a DampingFunction.
      70              :  *
      71              :  * \details Can be retrieved using
      72              :  * `gh::Tags::ConstraintGamma1`.
      73              :  */
      74              : template <size_t SpatialDim, typename Frame>
      75            1 : struct ConstraintGamma1Compute : ConstraintGamma1, db::ComputeTag {
      76            0 :   using argument_tags =
      77              :       tmpl::list<DampingFunctionGamma1<SpatialDim, Frame>,
      78              :                  domain::Tags::Coordinates<SpatialDim, Frame>, ::Tags::Time,
      79              :                  ::domain::Tags::FunctionsOfTime>;
      80            0 :   using return_type = Scalar<DataVector>;
      81              : 
      82            0 :   static constexpr void function(
      83              :       const gsl::not_null<Scalar<DataVector>*> gamma1,
      84              :       const ::ConstraintDamping::DampingFunction<SpatialDim, Frame>&
      85              :           damping_function,
      86              :       const tnsr::I<DataVector, SpatialDim, Frame>& coords, const double time,
      87              :       const std::unordered_map<
      88              :           std::string,
      89              :           std::unique_ptr<domain::FunctionsOfTime::FunctionOfTime>>&
      90              :           functions_of_time) {
      91              :     damping_function(gamma1, coords, time, functions_of_time);
      92              :   }
      93              : 
      94            0 :   using base = ConstraintGamma1;
      95              : };
      96              : 
      97              : /*!
      98              :  * \brief Computes the constraint damping parameter \f$\gamma_2\f$ from the
      99              :  * coordinates and a DampingFunction.
     100              :  *
     101              :  * \details Can be retrieved using
     102              :  * `gh::Tags::ConstraintGamma2`.
     103              :  */
     104              : template <size_t SpatialDim, typename Frame>
     105            1 : struct ConstraintGamma2Compute : ConstraintGamma2, db::ComputeTag {
     106            0 :   using argument_tags =
     107              :       tmpl::list<DampingFunctionGamma2<SpatialDim, Frame>,
     108              :                  domain::Tags::Coordinates<SpatialDim, Frame>, ::Tags::Time,
     109              :                  ::domain::Tags::FunctionsOfTime>;
     110            0 :   using return_type = Scalar<DataVector>;
     111              : 
     112            0 :   static constexpr void function(
     113              :       const gsl::not_null<Scalar<DataVector>*> gamma,
     114              :       const ::ConstraintDamping::DampingFunction<SpatialDim, Frame>&
     115              :           damping_function,
     116              :       const tnsr::I<DataVector, SpatialDim, Frame>& coords, const double time,
     117              :       const std::unordered_map<
     118              :           std::string,
     119              :           std::unique_ptr<domain::FunctionsOfTime::FunctionOfTime>>&
     120              :           functions_of_time) {
     121              :     damping_function(gamma, coords, time, functions_of_time);
     122              :   }
     123              : 
     124            0 :   using base = ConstraintGamma2;
     125              : };
     126              : }  // namespace gh::Tags
        

Generated by: LCOV version 2.0-1