SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/GrMhd/ValenciaDivClean - QuadrupoleFormula.hpp Hit Total Coverage
Commit: 664546099c4dbf27a1b708fac45e39c82dd743d2 Lines: 2 12 16.7 %
Date: 2024-04-19 16:28:01
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/DataBox/TagName.hpp"
      10             : #include "DataStructures/Tensor/TypeAliases.hpp"
      11             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/TagsDeclarations.hpp"  // IWYU pragma: keep
      12             : #include "PointwiseFunctions/GeneralRelativity/TagsDeclarations.hpp"  // IWYU pragma: keep
      13             : #include "PointwiseFunctions/Hydro/QuadrupoleFormula.hpp"
      14             : #include "PointwiseFunctions/Hydro/Tags.hpp"
      15             : #include "PointwiseFunctions/Hydro/TagsDeclarations.hpp"  // IWYU pragma: keep
      16             : #include "Utilities/TMPL.hpp"
      17             : 
      18             : /// \cond
      19             : namespace gsl {
      20             : template <typename>
      21             : struct not_null;
      22             : }  // namespace gsl
      23             : /// \endcond
      24             : 
      25             : namespace grmhd::ValenciaDivClean::Tags {
      26             : /// \brief Compute tag for the quadrupole moment.
      27             : ///
      28             : /// Compute item for the quadrupole moment, using
      29             : /// \f$\tilde{D} x^i x^j\f$ (equation 21 of \cite Shibata2003),
      30             : /// with \f$\tilde{D}=\sqrt{\gamma}\rho W\f$, $W$ being the Lorentz factor,
      31             : /// $\gamma$ being the determinant of the spatial metric, and
      32             : /// \f$x\f$ the coordinates in Frame Fr.
      33             : template <typename DataType, size_t Dim, typename OutputCoordsTag,
      34             :           typename Fr = Frame::Inertial>
      35           1 : struct QuadrupoleMomentCompute
      36             :     : hydro::Tags::QuadrupoleMoment<DataType, Dim, Fr>,
      37             :       db::ComputeTag {
      38           0 :   using argument_tags = tmpl::list<TildeD, OutputCoordsTag>;
      39             : 
      40           0 :   using base = hydro::Tags::QuadrupoleMoment<DataType, Dim, Fr>;
      41           0 :   using return_type = typename base::type;
      42             : 
      43           0 :   static constexpr auto function = static_cast<void (*)(
      44             :       const gsl::not_null<tnsr::ii<DataType, Dim, Fr>*> result,
      45             :       const Scalar<DataType>& tilde_d,
      46             :       const tnsr::I<DataType, Dim, Fr>& coordinates)>(
      47             :       &hydro::quadrupole_moment<DataType, Dim, Fr>);
      48             : };
      49             : 
      50             : /// \brief Compute tag for the first time derivative of the quadrupole moment.
      51             : ///
      52             : /// Compute item for the first time derivative of the quadrupole moment, using
      53             : /// \f$\tilde{D} (v^i x^j + x^i v^j)\f$ (equation 23 of \cite Shibata2003),
      54             : /// with \f$\tilde{D}=\sqrt{\gamma}\rho W\f$, $W$ being the Lorentz factor,
      55             : /// $\gamma$ being the determinant of the spatial metric, \f$x\f$ the
      56             : /// coordinates in Frame Fr, and \f$v\f$ the corresponding spatial velocity.
      57             : template <typename DataType, size_t Dim, typename OutputCoordsTag,
      58             :           typename VelocityTag, typename Fr = Frame::Inertial>
      59           1 : struct QuadrupoleMomentDerivativeCompute
      60             :     : hydro::Tags::QuadrupoleMomentDerivative<DataType, Dim, Fr>,
      61             :       db::ComputeTag {
      62           0 :   using argument_tags = tmpl::list<TildeD, OutputCoordsTag, VelocityTag>;
      63             : 
      64           0 :   using base = hydro::Tags::QuadrupoleMomentDerivative<DataType, Dim, Fr>;
      65           0 :   using return_type = typename base::type;
      66             : 
      67           0 :   static std::string name() {
      68             :     return "QuadrupoleMomentDerivative(" + db::tag_name<VelocityTag>() + ")";
      69             :   }
      70             : 
      71           0 :   static constexpr auto function = static_cast<void (*)(
      72             :       const gsl::not_null<tnsr::ii<DataType, Dim, Fr>*> result,
      73             :       const Scalar<DataType>& tilde_d,
      74             :       const tnsr::I<DataType, Dim, Fr>& coordinates,
      75             :       const tnsr::I<DataType, Dim, Fr>& spatial_velocity)>(
      76             :       &hydro::quadrupole_moment_derivative<DataType, Dim, Fr>);
      77             : };
      78             : }  // namespace grmhd::ValenciaDivClean::Tags

Generated by: LCOV version 1.14