SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/GrMhd/ValenciaDivClean - TimeDerivativeTerms.hpp Hit Total Coverage
Commit: 1f2210958b4f38fdc0400907ee7c6d5af5111418 Lines: 1 21 4.8 %
Date: 2025-12-05 05:03:31
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/DataBoxTag.hpp"
       7             : #include "DataStructures/Tensor/TypeAliases.hpp"
       8             : #include "DataStructures/Variables.hpp"
       9             : #include "Evolution/DiscontinuousGalerkin/TimeDerivativeDecisions.hpp"
      10             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/TagsDeclarations.hpp"
      11             : #include "NumericalAlgorithms/LinearOperators/PartialDerivatives.hpp"
      12             : #include "PointwiseFunctions/GeneralRelativity/TagsDeclarations.hpp"
      13             : #include "PointwiseFunctions/Hydro/Tags.hpp"
      14             : #include "PointwiseFunctions/Hydro/TagsDeclarations.hpp"
      15             : #include "Utilities/TMPL.hpp"
      16             : 
      17             : /// \cond
      18             : namespace gsl {
      19             : template <typename T>
      20             : class not_null;
      21             : }  // namespace gsl
      22             : 
      23             : class DataVector;
      24             : /// \endcond
      25             : 
      26             : namespace grmhd::ValenciaDivClean {
      27             : /*!
      28             :  * \brief Compute the time derivative of the conserved variables for the
      29             :  * Valencia formulation of the GRMHD equations with divergence cleaning.
      30             :  */
      31           1 : struct TimeDerivativeTerms {
      32           0 :   struct MagneticFieldOneForm : db::SimpleTag {
      33           0 :     using type = tnsr::i<DataVector, 3, Frame::Inertial>;
      34             :   };
      35           0 :   struct TildeSUp : db::SimpleTag {
      36           0 :     using type = tnsr::I<DataVector, 3, Frame::Inertial>;
      37             :   };
      38           0 :   struct DensitizedStress : db::SimpleTag {
      39           0 :     using type = tnsr::II<DataVector, 3, Frame::Inertial>;
      40             :   };
      41           0 :   struct OneOverLorentzFactorSquared : db::SimpleTag {
      42           0 :     using type = Scalar<DataVector>;
      43             :   };
      44           0 :   struct PressureStarLapseSqrtDetSpatialMetric : db::SimpleTag {
      45           0 :     using type = Scalar<DataVector>;
      46             :   };
      47           0 :   struct PressureStar : db::SimpleTag {
      48           0 :     using type = Scalar<DataVector>;
      49             :   };
      50           0 :   struct EnthalpyTimesDensityWSquaredPlusBSquared : db::SimpleTag {
      51           0 :     using type = Scalar<DataVector>;
      52             :   };
      53           0 :   struct LapseTimesbOverW : db::SimpleTag {
      54           0 :     using type = tnsr::i<DataVector, 3, Frame::Inertial>;
      55             :   };
      56             : 
      57           0 :   using temporary_tags = tmpl::list<
      58             :       // Flux terms
      59             :       hydro::Tags::SpatialVelocityOneForm<DataVector, 3, Frame::Inertial>,
      60             :       hydro::Tags::MagneticFieldOneForm<DataVector, 3, Frame::Inertial>,
      61             :       hydro::Tags::MagneticFieldDotSpatialVelocity<DataVector>,
      62             :       hydro::Tags::MagneticFieldSquared<DataVector>,
      63             :       OneOverLorentzFactorSquared, PressureStar,
      64             :       PressureStarLapseSqrtDetSpatialMetric,
      65             :       hydro::Tags::TransportVelocity<DataVector, 3, Frame::Inertial>,
      66             :       LapseTimesbOverW,
      67             : 
      68             :       // Source terms
      69             :       TildeSUp, DensitizedStress,
      70             :       gr::Tags::SpatialChristoffelFirstKind<DataVector, 3>,
      71             :       gr::Tags::SpatialChristoffelSecondKind<DataVector, 3>,
      72             :       gr::Tags::TraceSpatialChristoffelSecondKind<DataVector, 3>,
      73             :       EnthalpyTimesDensityWSquaredPlusBSquared,
      74             : 
      75             :       // Need lapse, shift, and inverse spatial metric to be projected to the
      76             :       // boundary for Riemann solvers.
      77             :       gr::Tags::Lapse<DataVector>, gr::Tags::Shift<DataVector, 3>,
      78             :       gr::Tags::InverseSpatialMetric<DataVector, 3>>;
      79           0 :   using argument_tags =
      80             :       tmpl::list<grmhd::ValenciaDivClean::Tags::TildeD,
      81             :                  grmhd::ValenciaDivClean::Tags::TildeYe,
      82             :                  grmhd::ValenciaDivClean::Tags::TildeTau,
      83             :                  grmhd::ValenciaDivClean::Tags::TildeS<>,
      84             :                  grmhd::ValenciaDivClean::Tags::TildeB<>,
      85             :                  grmhd::ValenciaDivClean::Tags::TildePhi,
      86             :                  gr::Tags::Lapse<DataVector>, gr::Tags::Shift<DataVector, 3>,
      87             :                  gr::Tags::SqrtDetSpatialMetric<DataVector>,
      88             :                  gr::Tags::SpatialMetric<DataVector, 3>,
      89             :                  gr::Tags::InverseSpatialMetric<DataVector, 3>,
      90             :                  ::Tags::deriv<gr::Tags::Lapse<DataVector>, tmpl::size_t<3>,
      91             :                                Frame::Inertial>,
      92             :                  ::Tags::deriv<gr::Tags::Shift<DataVector, 3>, tmpl::size_t<3>,
      93             :                                Frame::Inertial>,
      94             :                  ::Tags::deriv<gr::Tags::SpatialMetric<DataVector, 3>,
      95             :                                tmpl::size_t<3>, Frame::Inertial>,
      96             :                  hydro::Tags::Pressure<DataVector>,
      97             :                  hydro::Tags::SpatialVelocity<DataVector, 3>,
      98             :                  hydro::Tags::LorentzFactor<DataVector>,
      99             :                  hydro::Tags::MagneticField<DataVector, 3>,
     100             :                  hydro::Tags::RestMassDensity<DataVector>,
     101             :                  hydro::Tags::ElectronFraction<DataVector>,
     102             :                  hydro::Tags::SpecificInternalEnergy<DataVector>,
     103             :                  gr::Tags::ExtrinsicCurvature<DataVector, 3>,
     104             :                  grmhd::ValenciaDivClean::Tags::ConstraintDampingParameter>;
     105             : 
     106           0 :   static evolution::dg::TimeDerivativeDecisions<3> apply(
     107             :       gsl::not_null<Scalar<DataVector>*> /*non_flux_terms_dt_tilde_d*/,
     108             :       gsl::not_null<Scalar<DataVector>*> /*non_flux_terms_dt_tilde_ye*/,
     109             :       gsl::not_null<Scalar<DataVector>*> non_flux_terms_dt_tilde_tau,
     110             :       gsl::not_null<tnsr::i<DataVector, 3, Frame::Inertial>*>
     111             :           non_flux_terms_dt_tilde_s,
     112             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*>
     113             :           non_flux_terms_dt_tilde_b,
     114             :       gsl::not_null<Scalar<DataVector>*> non_flux_terms_dt_tilde_phi,
     115             : 
     116             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_d_flux,
     117             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_ye_flux,
     118             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_tau_flux,
     119             :       gsl::not_null<tnsr::Ij<DataVector, 3, Frame::Inertial>*> tilde_s_flux,
     120             :       gsl::not_null<tnsr::IJ<DataVector, 3, Frame::Inertial>*> tilde_b_flux,
     121             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_phi_flux,
     122             : 
     123             :       gsl::not_null<tnsr::i<DataVector, 3, Frame::Inertial>*>
     124             :           spatial_velocity_one_form,
     125             :       gsl::not_null<tnsr::i<DataVector, 3, Frame::Inertial>*>
     126             :           magnetic_field_one_form,
     127             :       gsl::not_null<Scalar<DataVector>*> magnetic_field_dot_spatial_velocity,
     128             :       gsl::not_null<Scalar<DataVector>*> magnetic_field_squared,
     129             :       gsl::not_null<Scalar<DataVector>*> one_over_w_squared,
     130             :       gsl::not_null<Scalar<DataVector>*> pressure_star,
     131             :       gsl::not_null<Scalar<DataVector>*>
     132             :           pressure_star_lapse_sqrt_det_spatial_metric,
     133             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*>
     134             :           transport_velocity,
     135             :       gsl::not_null<tnsr::i<DataVector, 3, Frame::Inertial>*> lapse_b_over_w,
     136             : 
     137             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_s_up,
     138             :       gsl::not_null<tnsr::II<DataVector, 3, Frame::Inertial>*>
     139             :           densitized_stress,
     140             :       gsl::not_null<tnsr::ijj<DataVector, 3, Frame::Inertial>*>
     141             :           spatial_christoffel_first_kind,
     142             :       gsl::not_null<tnsr::Ijj<DataVector, 3, Frame::Inertial>*>
     143             :           spatial_christoffel_second_kind,
     144             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*>
     145             :           trace_spatial_christoffel_second,
     146             :       gsl::not_null<Scalar<DataVector>*> h_rho_w_squared_plus_b_squared,
     147             : 
     148             :       gsl::not_null<Scalar<DataVector>*> temp_lapse,
     149             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> temp_shift,
     150             :       gsl::not_null<tnsr::II<DataVector, 3, Frame::Inertial>*>
     151             :           temp_inverse_spatial_metric,
     152             : 
     153             :       const Scalar<DataVector>& tilde_d, const Scalar<DataVector>& tilde_ye,
     154             :       const Scalar<DataVector>& tilde_tau,
     155             :       const tnsr::i<DataVector, 3, Frame::Inertial>& tilde_s,
     156             :       const tnsr::I<DataVector, 3, Frame::Inertial>& tilde_b,
     157             :       const Scalar<DataVector>& tilde_phi, const Scalar<DataVector>& lapse,
     158             :       const tnsr::I<DataVector, 3, Frame::Inertial>& shift,
     159             :       const Scalar<DataVector>& sqrt_det_spatial_metric,
     160             :       const tnsr::ii<DataVector, 3, Frame::Inertial>& spatial_metric,
     161             :       const tnsr::II<DataVector, 3, Frame::Inertial>& inv_spatial_metric,
     162             :       const tnsr::i<DataVector, 3, Frame::Inertial>& d_lapse,
     163             :       const tnsr::iJ<DataVector, 3, Frame::Inertial>& d_shift,
     164             :       const tnsr::ijj<DataVector, 3, Frame::Inertial>& d_spatial_metric,
     165             :       const Scalar<DataVector>& pressure,
     166             :       const tnsr::I<DataVector, 3, Frame::Inertial>& spatial_velocity,
     167             :       const Scalar<DataVector>& lorentz_factor,
     168             :       const tnsr::I<DataVector, 3, Frame::Inertial>& magnetic_field,
     169             : 
     170             :       const Scalar<DataVector>& rest_mass_density,
     171             :       const Scalar<DataVector>& electron_fraction,
     172             :       const Scalar<DataVector>& specific_internal_energy,
     173             :       const tnsr::ii<DataVector, 3, Frame::Inertial>& extrinsic_curvature,
     174             :       double constraint_damping_parameter);
     175             : };
     176             : }  // namespace grmhd::ValenciaDivClean

Generated by: LCOV version 1.14