SpECTRE Documentation Coverage Report
 Current view: top level - Evolution/Systems/GrMhd/ValenciaDivClean - QuadrupoleFormula.hpp Hit Total Coverage Commit: 318ae36d2001e2abec5256f34415b420007ed6cc Lines: 2 12 16.7 % Date: 2024-07-18 18:43:07 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 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 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 35 1 : struct QuadrupoleMomentCompute 36 : : hydro::Tags::QuadrupoleMoment, 37 : db::ComputeTag { 38 0 : using argument_tags = tmpl::list; 39 : 40 0 : using base = hydro::Tags::QuadrupoleMoment; 41 0 : using return_type = typename base::type; 42 : 43 0 : static constexpr auto function = static_cast*> result, 45 : const Scalar& tilde_d, 46 : const tnsr::I& coordinates)>( 47 : &hydro::quadrupole_moment); 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 59 1 : struct QuadrupoleMomentDerivativeCompute 60 : : hydro::Tags::QuadrupoleMomentDerivative, 61 : db::ComputeTag { 62 0 : using argument_tags = tmpl::list; 63 : 64 0 : using base = hydro::Tags::QuadrupoleMomentDerivative; 65 0 : using return_type = typename base::type; 66 : 67 0 : static std::string name() { 68 : return "QuadrupoleMomentDerivative(" + db::tag_name() + ")"; 69 : } 70 : 71 0 : static constexpr auto function = static_cast*> result, 73 : const Scalar& tilde_d, 74 : const tnsr::I& coordinates, 75 : const tnsr::I& spatial_velocity)>( 76 : &hydro::quadrupole_moment_derivative); 77 : }; 78 : } // namespace grmhd::ValenciaDivClean::Tags 

 Generated by: LCOV version 1.14