SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/ScalarTensor - ScalarCharge.hpp Hit Total Coverage
Commit: 965048f86d23c819715b3af1ca3f880c8145d4bb Lines: 3 11 27.3 %
Date: 2024-05-16 17:00:40
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 "DataStructures/DataBox/Tag.hpp"
       7             : #include "DataStructures/Tensor/Tensor.hpp"
       8             : #include "DataStructures/Tensor/TypeAliases.hpp"
       9             : #include "Evolution/Systems/CurvedScalarWave/Tags.hpp"
      10             : #include "PointwiseFunctions/GeneralRelativity/Surfaces/TagsDeclarations.hpp"  // IWYU pragma: keep
      11             : #include "Utilities/Gsl.hpp"
      12             : #include "Utilities/TMPL.hpp"
      13             : 
      14             : namespace ScalarTensor {
      15             : 
      16             : /// @{
      17             : /*!
      18             :  * \brief The scalar charge per unit solid angle.
      19             :  *
      20             :  * \details This function calculates the integrand of:
      21             :  * \f{align*}
      22             :  * q = - \dfrac{1}{4 \pi} \oint dA \Phi_i n^{i},
      23             :  * \f}
      24             :  * where \f$ n^{i} \f$ is the unit (outward) normal of the surface.
      25             :  *
      26             :  * For a spherically symmetric scalar, this value will coincide with the value
      27             :  * as extracted from the $r^{-1}$ decay in
      28             :  * \f[ \Psi \sim \phi_\infty + q / r + \cdots~. \f]
      29             :  */
      30           1 : void scalar_charge_integrand(const gsl::not_null<Scalar<DataVector>*> result,
      31             :                              const tnsr::i<DataVector, 3>& phi,
      32             :                              const tnsr::I<DataVector, 3>& unit_normal_vector);
      33             : /// @}
      34             : 
      35             : } // namespace ScalarTensor
      36             : 
      37           0 : namespace ScalarTensor::StrahlkorperScalar::Tags {
      38             : 
      39             : /*!
      40             :  * \brief The scalar charge per unit area.
      41             :  *
      42             :  * \details This tag holds the integrand of:
      43             :  * \f{align*}
      44             :  * q = - \dfrac{1}{4 \pi} \oint dA \Phi_i n^{i},
      45             :  * \f}
      46             :  * where \f$ n^{i} \f$ is the unit (outward) normal of the surface.
      47             :  *
      48             :  * For a spherically symmetric scalar, this value will coincide with the value
      49             :  * as extracted from the $r^{-1}$ decay in
      50             :  * \f[ \Psi \sim \phi_\infty + q / r + \cdots~. \f]
      51             :  */
      52           1 : struct ScalarChargeIntegrand : db::SimpleTag {
      53           0 :   using type = Scalar<DataVector>;
      54             : };
      55             : 
      56             : /*!
      57             :  * \brief Compute tag for the scalar charge per unit area.
      58             :  *
      59             :  * \see ScalarTensor::StrahlkorperScalar::Tags::ScalarChargeIntegrand
      60             :  */
      61           1 : struct ScalarChargeIntegrandCompute : ScalarChargeIntegrand, db::ComputeTag {
      62           0 :   static constexpr size_t Dim = 3;
      63           0 :   using base = ScalarChargeIntegrand;
      64           0 :   static constexpr auto function = &ScalarTensor::scalar_charge_integrand;
      65           0 :   using argument_tags =
      66             :       tmpl::list<CurvedScalarWave::Tags::Phi<Dim>,
      67             :                  ylm::Tags::UnitNormalVector<Frame::Inertial>>;
      68           0 :   using return_type = Scalar<DataVector>;
      69             : };
      70             : 
      71             : }  // namespace ScalarTensor::StrahlkorperTags

Generated by: LCOV version 1.14