SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/Hydro - QuadrupoleFormula.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 57.1 % 7 4
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/Tag.hpp"
       9              : #include "DataStructures/Tensor/TypeAliases.hpp"
      10              : 
      11              : /// \cond
      12              : namespace gsl {
      13              : template <typename>
      14              : struct not_null;
      15              : }  // namespace gsl
      16              : /// \endcond
      17              : 
      18              : namespace hydro {
      19              : 
      20              : namespace Tags {
      21              : /// \brief Tag containing the quadrupole moment.
      22              : ///
      23              : /// The quadrupole moment is defined as \f$\tilde{D} x^i x^j\f$
      24              : /// (equation 21 of \cite Shibata2003), with
      25              : /// \f$\tilde{D}=\sqrt{\gamma}\rho W\f$, $W$ being the Lorentz factor,
      26              : /// $\gamma$ being the determinant of the spatial metric, and
      27              : /// \f$x\f$ the coordinates in Frame Fr.
      28              : template <typename DataType, size_t Dim, typename Fr = Frame::Inertial>
      29            1 : struct QuadrupoleMoment : db::SimpleTag {
      30            0 :   using type = tnsr::ii<DataType, Dim, Fr>;
      31              : };
      32              : 
      33              : /// \brief Tag containing the first time derivative of the quadrupole moment.
      34              : ///
      35              : /// For the first derivative of the quadrupole moment, we use
      36              : /// \f$\tilde{D} (v^i x^j + x^i v^j)\f$ (equation 23 of \cite Shibata2003),
      37              : /// with \f$\tilde{D}=\sqrt{\gamma}\rho W\f$, $W$ being the Lorentz factor,
      38              : /// $\gamma$ being the determinant of the spatial metric, \f$x\f$ the
      39              : /// coordinates in Frame Fr, and \f$v\f$ the corresponding spatial velocity.
      40              : template <typename DataType, size_t Dim, typename Fr = Frame::Inertial>
      41            1 : struct QuadrupoleMomentDerivative : db::SimpleTag {
      42            0 :   using type = tnsr::ii<DataType, Dim, Fr>;
      43              : };
      44              : }  // namespace Tags
      45              : 
      46              : /// \brief Function computing the quadrupole moment.
      47              : ///
      48              : /// Computes the quadrupole moment, using
      49              : /// \f$\tilde{D} x^i x^j\f$ (equation 21 of \cite Shibata2003),
      50              : /// with \f$\tilde{D}=\sqrt{\gamma}\rho W\f$, $W$ being the Lorentz factor,
      51              : /// $\gamma$ being the determinant of the spatial metric, and
      52              : /// \f$x\f$ the coordinates in Frame Fr. Result of calculation stored in result.
      53              : template <typename DataType, size_t Dim, typename Fr = Frame::Inertial>
      54            1 : void quadrupole_moment(
      55              :     const gsl::not_null<tnsr::ii<DataType, Dim, Fr>*> result,
      56              :     const Scalar<DataType>& tilde_d,
      57              :     const tnsr::I<DataType, Dim, Fr>& coordinates);
      58              : 
      59              : /// \brief Function computing the first time derivative of the
      60              : /// quadrupole moment.
      61              : ///
      62              : /// Computes the first time derivative of the quadrupole moment, using
      63              : /// \f$\tilde{D} (v^i x^j + x^i v^j)\f$ (equation 23 of \cite Shibata2003),
      64              : /// with \f$\tilde{D}=\sqrt{\gamma}\rho W\f$, $W$ being the Lorentz factor,
      65              : /// $\gamma$ being the determinant of the spatial metric, \f$x\f$ the
      66              : /// coordinates in Frame Fr, and \f$v\f$ the corresponding spatial velocity.
      67              : /// Result of calculation stored in result.
      68              : template <typename DataType, size_t Dim, typename Fr = Frame::Inertial>
      69            1 : void quadrupole_moment_derivative(
      70              :     const gsl::not_null<tnsr::ii<DataType, Dim, Fr>*> result,
      71              :     const Scalar<DataType>& tilde_d,
      72              :     const tnsr::I<DataType, Dim, Fr>& coordinates,
      73              :     const tnsr::I<DataType, Dim, Fr>& spatial_velocity);
      74              : 
      75              : } // namespace hydro
        

Generated by: LCOV version 2.0-1