SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/GrMhd/ValenciaDivClean - Fluxes.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 20.0 % 5 1
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 "DataStructures/DataBox/Prefixes.hpp"
       7              : #include "DataStructures/Tensor/TypeAliases.hpp"
       8              : #include "Evolution/Systems/GrMhd/ValenciaDivClean/TagsDeclarations.hpp"
       9              : #include "PointwiseFunctions/GeneralRelativity/TagsDeclarations.hpp"
      10              : #include "PointwiseFunctions/Hydro/TagsDeclarations.hpp"
      11              : #include "Utilities/TMPL.hpp"
      12              : 
      13              : /// \cond
      14              : namespace gsl {
      15              : template <typename T>
      16              : class not_null;
      17              : }  // namespace gsl
      18              : 
      19              : class DataVector;
      20              : /// \endcond
      21              : 
      22              : namespace grmhd {
      23              : namespace ValenciaDivClean {
      24              : namespace detail {
      25              : void fluxes_impl(
      26              :     gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_d_flux,
      27              :     gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_ye_flux,
      28              :     gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_tau_flux,
      29              :     gsl::not_null<tnsr::Ij<DataVector, 3, Frame::Inertial>*> tilde_s_flux,
      30              :     gsl::not_null<tnsr::IJ<DataVector, 3, Frame::Inertial>*> tilde_b_flux,
      31              :     gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_phi_flux,
      32              : 
      33              :     // Temporaries
      34              :     gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> transport_velocity,
      35              :     const tnsr::i<DataVector, 3, Frame::Inertial>& lapse_b_over_w,
      36              :     const Scalar<DataVector>& magnetic_field_dot_spatial_velocity,
      37              :     const Scalar<DataVector>& pressure_star_lapse_sqrt_det_spatial_metric,
      38              : 
      39              :     // Extra args
      40              :     const Scalar<DataVector>& tilde_d, const Scalar<DataVector>& tilde_ye,
      41              :     const Scalar<DataVector>& tilde_tau,
      42              :     const tnsr::i<DataVector, 3, Frame::Inertial>& tilde_s,
      43              :     const tnsr::I<DataVector, 3, Frame::Inertial>& tilde_b,
      44              :     const Scalar<DataVector>& tilde_phi, const Scalar<DataVector>& lapse,
      45              :     const tnsr::I<DataVector, 3, Frame::Inertial>& shift,
      46              :     const tnsr::II<DataVector, 3, Frame::Inertial>& inv_spatial_metric,
      47              :     const tnsr::I<DataVector, 3, Frame::Inertial>& spatial_velocity);
      48              : }  // namespace detail
      49              : 
      50              : /*!
      51              :  * \brief The fluxes of the conservative variables
      52              :  *
      53              :  * \f{align*}
      54              :  * F^i({\tilde D}) = &~ {\tilde D} v^i_{tr} \\
      55              :  * F^i({\tilde Y}_e) = &~ {\tilde Y}_e v^i_{tr} \\
      56              :  * F^i({\tilde S}_j) = &~  {\tilde S}_j v^i_{tr} + \sqrt{\gamma} \alpha \left( p
      57              :  * + p_m \right) \delta^i_j - \frac{B_j {\tilde B}^i}{W^2} - v_j {\tilde B}^i
      58              :  * B^m v_m\\
      59              :  * F^i({\tilde \tau}) = &~  {\tilde \tau} v^i_{tr} + \sqrt{\gamma} \alpha \left(
      60              :  * p + p_m \right) v^i - \alpha {\tilde B}^i B^m v_m \\
      61              :  * F^i({\tilde B}^j) = &~  {\tilde B}^j v^i_{tr} - \alpha v^j {\tilde B}^i +
      62              :  * \alpha \gamma^{ij} {\tilde \Phi} \\
      63              :  * F^i({\tilde \Phi}) = &~ \alpha {\tilde B^i} - \beta^i {\tilde \Phi}
      64              :  * \f}
      65              :  *
      66              :  * where the conserved variables \f${\tilde D}\f$, \f${\tilde Y}_e\f$,
      67              :  * \f${\tilde S}_i\f$, \f${\tilde \tau}\f$, \f${\tilde B}^i\f$, and \f${\tilde
      68              :  * \Phi}\f$ are a generalized mass-energy density, electron fraction, momentum
      69              :  * density, specific internal energy density, magnetic field, and divergence
      70              :  * cleaning field. Furthermore, \f$v^i_{tr} = \alpha v^i - \beta^i\f$ is the
      71              :  * transport velocity, \f$\alpha\f$ is the lapse, \f$\beta^i\f$ is the shift,
      72              :  * \f$\gamma\f$ is the determinant of the spatial metric \f$\gamma_{ij}\f$,
      73              :  * \f$Y_e\f$ is the electron fraction, \f$v^i\f$ is the spatial velocity,
      74              :  * \f$B^i\f$ is the spatial magnetic field measured by an Eulerian observer,
      75              :  * \f$p\f$ is the fluid pressure, and \f$p_m = \frac{1}{2} \left[ \left( B^n v_n
      76              :  * \right)^2 + B^n B_n / W^2 \right]\f$ is the magnetic pressure.
      77              :  */
      78            1 : struct ComputeFluxes {
      79            0 :   using return_tags =
      80              :       tmpl::list<::Tags::Flux<grmhd::ValenciaDivClean::Tags::TildeD,
      81              :                               tmpl::size_t<3>, Frame::Inertial>,
      82              :                  ::Tags::Flux<grmhd::ValenciaDivClean::Tags::TildeYe,
      83              :                               tmpl::size_t<3>, Frame::Inertial>,
      84              :                  ::Tags::Flux<grmhd::ValenciaDivClean::Tags::TildeTau,
      85              :                               tmpl::size_t<3>, Frame::Inertial>,
      86              :                  ::Tags::Flux<grmhd::ValenciaDivClean::Tags::TildeS<>,
      87              :                               tmpl::size_t<3>, Frame::Inertial>,
      88              :                  ::Tags::Flux<grmhd::ValenciaDivClean::Tags::TildeB<>,
      89              :                               tmpl::size_t<3>, Frame::Inertial>,
      90              :                  ::Tags::Flux<grmhd::ValenciaDivClean::Tags::TildePhi,
      91              :                               tmpl::size_t<3>, Frame::Inertial>>;
      92              : 
      93            0 :   using argument_tags =
      94              :       tmpl::list<grmhd::ValenciaDivClean::Tags::TildeD,
      95              :                  grmhd::ValenciaDivClean::Tags::TildeYe,
      96              :                  grmhd::ValenciaDivClean::Tags::TildeTau,
      97              :                  grmhd::ValenciaDivClean::Tags::TildeS<>,
      98              :                  grmhd::ValenciaDivClean::Tags::TildeB<>,
      99              :                  grmhd::ValenciaDivClean::Tags::TildePhi,
     100              :                  gr::Tags::Lapse<DataVector>, gr::Tags::Shift<DataVector, 3>,
     101              :                  gr::Tags::SqrtDetSpatialMetric<DataVector>,
     102              :                  gr::Tags::SpatialMetric<DataVector, 3>,
     103              :                  gr::Tags::InverseSpatialMetric<DataVector, 3>,
     104              :                  hydro::Tags::Pressure<DataVector>,
     105              :                  hydro::Tags::SpatialVelocity<DataVector, 3>,
     106              :                  hydro::Tags::LorentzFactor<DataVector>,
     107              :                  hydro::Tags::MagneticField<DataVector, 3>>;
     108              : 
     109            0 :   static void apply(
     110              :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_d_flux,
     111              :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_ye_flux,
     112              :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_tau_flux,
     113              :       gsl::not_null<tnsr::Ij<DataVector, 3, Frame::Inertial>*> tilde_s_flux,
     114              :       gsl::not_null<tnsr::IJ<DataVector, 3, Frame::Inertial>*> tilde_b_flux,
     115              :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_phi_flux,
     116              :       const Scalar<DataVector>& tilde_d, const Scalar<DataVector>& tilde_ye,
     117              :       const Scalar<DataVector>& tilde_tau,
     118              :       const tnsr::i<DataVector, 3, Frame::Inertial>& tilde_s,
     119              :       const tnsr::I<DataVector, 3, Frame::Inertial>& tilde_b,
     120              :       const Scalar<DataVector>& tilde_phi, const Scalar<DataVector>& lapse,
     121              :       const tnsr::I<DataVector, 3, Frame::Inertial>& shift,
     122              :       const Scalar<DataVector>& sqrt_det_spatial_metric,
     123              :       const tnsr::ii<DataVector, 3, Frame::Inertial>& spatial_metric,
     124              :       const tnsr::II<DataVector, 3, Frame::Inertial>& inv_spatial_metric,
     125              :       const Scalar<DataVector>& pressure,
     126              :       const tnsr::I<DataVector, 3, Frame::Inertial>& spatial_velocity,
     127              :       const Scalar<DataVector>& lorentz_factor,
     128              :       const tnsr::I<DataVector, 3, Frame::Inertial>& magnetic_field);
     129              : };
     130              : }  // namespace ValenciaDivClean
     131              : }  // namespace grmhd
        

Generated by: LCOV version 2.0-1