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

Generated by: LCOV version 1.14