SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/ForceFree - TimeDerivativeTerms.hpp Hit Total Coverage
Commit: 9b01d30df5d2e946e7e38cc43c008be18ae9b1d2 Lines: 1 11 9.1 %
Date: 2024-04-23 04:54:49
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 "Evolution/Systems/ForceFree/Tags.hpp"
       9             : #include "NumericalAlgorithms/LinearOperators/PartialDerivatives.hpp"
      10             : #include "PointwiseFunctions/GeneralRelativity/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             : /// \endcond
      19             : 
      20             : namespace ForceFree {
      21             : 
      22             : /*!
      23             :  * \brief Compute the time derivative of the conserved variables for the GRFFE
      24             :  * equations with divergence cleaning.
      25             :  *
      26             :  */
      27           1 : struct TimeDerivativeTerms {
      28           0 :   struct LapseTimesElectricFieldOneForm : db::SimpleTag {
      29           0 :     using type = tnsr::i<DataVector, 3, Frame::Inertial>;
      30             :   };
      31           0 :   struct LapseTimesMagneticFieldOneForm : db::SimpleTag {
      32           0 :     using type = tnsr::i<DataVector, 3, Frame::Inertial>;
      33             :   };
      34           0 :   struct TildeJDrift : db::SimpleTag {
      35           0 :     using type = tnsr::I<DataVector, 3, Frame::Inertial>;
      36             :   };
      37             : 
      38           0 :   using temporary_tags = tmpl::list<
      39             :       // Flux terms
      40             :       LapseTimesElectricFieldOneForm, LapseTimesMagneticFieldOneForm,
      41             : 
      42             :       // Source terms
      43             :       TildeJDrift, gr::Tags::SpatialChristoffelFirstKind<DataVector, 3>,
      44             :       gr::Tags::SpatialChristoffelSecondKind<DataVector, 3>,
      45             :       gr::Tags::TraceSpatialChristoffelSecondKind<DataVector, 3>,
      46             : 
      47             :       // Need lapse, shift, and inverse spatial metric to be projected to
      48             :       // the boundary for Riemann solvers.
      49             :       gr::Tags::Lapse<DataVector>, gr::Tags::Shift<DataVector, 3>,
      50             :       gr::Tags::InverseSpatialMetric<DataVector, 3>>;
      51             : 
      52           0 :   using argument_tags = tmpl::list<
      53             :       // EM tags
      54             :       Tags::TildeE, Tags::TildeB, Tags::TildePsi, Tags::TildePhi, Tags::TildeQ,
      55             :       Tags::TildeJ, Tags::KappaPsi, Tags::KappaPhi, Tags::ParallelConductivity,
      56             : 
      57             :       // GR-related tags
      58             :       gr::Tags::Lapse<DataVector>, gr::Tags::Shift<DataVector, 3>,
      59             :       gr::Tags::SqrtDetSpatialMetric<DataVector>,
      60             :       gr::Tags::SpatialMetric<DataVector, 3>,
      61             :       gr::Tags::InverseSpatialMetric<DataVector, 3>,
      62             :       gr::Tags::ExtrinsicCurvature<DataVector, 3>,
      63             :       ::Tags::deriv<gr::Tags::Lapse<DataVector>, tmpl::size_t<3>,
      64             :                     Frame::Inertial>,
      65             :       ::Tags::deriv<gr::Tags::Shift<DataVector, 3>, tmpl::size_t<3>,
      66             :                     Frame::Inertial>,
      67             :       ::Tags::deriv<gr::Tags::SpatialMetric<DataVector, 3>, tmpl::size_t<3>,
      68             :                     Frame::Inertial>>;
      69             : 
      70           0 :   static void apply(
      71             :       // Time derivatives returned by reference.
      72             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*>
      73             :           non_flux_terms_dt_tilde_e,
      74             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*>
      75             :           non_flux_terms_dt_tilde_b,
      76             :       gsl::not_null<Scalar<DataVector>*> non_flux_terms_dt_tilde_psi,
      77             :       gsl::not_null<Scalar<DataVector>*> non_flux_terms_dt_tilde_phi,
      78             :       gsl::not_null<Scalar<DataVector>*> /*non_flux_terms_dt_tilde_q*/,
      79             : 
      80             :       // Fluxes returned by reference. Listed in the system struct as
      81             :       // flux_variables.
      82             :       gsl::not_null<tnsr::IJ<DataVector, 3, Frame::Inertial>*> tilde_e_flux,
      83             :       gsl::not_null<tnsr::IJ<DataVector, 3, Frame::Inertial>*> tilde_b_flux,
      84             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_psi_flux,
      85             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_phi_flux,
      86             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_q_flux,
      87             : 
      88             :       // temporary tags
      89             :       gsl::not_null<tnsr::i<DataVector, 3, Frame::Inertial>*>
      90             :           lapse_times_electric_field_one_form,
      91             :       gsl::not_null<tnsr::i<DataVector, 3, Frame::Inertial>*>
      92             :           lapse_times_magnetic_field_one_form,
      93             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> tilde_j_drift,
      94             :       gsl::not_null<tnsr::ijj<DataVector, 3, Frame::Inertial>*>
      95             :           spatial_christoffel_first_kind,
      96             :       gsl::not_null<tnsr::Ijj<DataVector, 3, Frame::Inertial>*>
      97             :           spatial_christoffel_second_kind,
      98             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*>
      99             :           trace_spatial_christoffel_second,
     100             : 
     101             :       gsl::not_null<Scalar<DataVector>*> temp_lapse,
     102             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> temp_shift,
     103             :       gsl::not_null<tnsr::II<DataVector, 3, Frame::Inertial>*>
     104             :           temp_inverse_spatial_metric,
     105             : 
     106             :       // argument tags
     107             :       const tnsr::I<DataVector, 3, Frame::Inertial>& tilde_e,
     108             :       const tnsr::I<DataVector, 3, Frame::Inertial>& tilde_b,
     109             :       const Scalar<DataVector>& tilde_psi, const Scalar<DataVector>& tilde_phi,
     110             :       const Scalar<DataVector>& tilde_q,
     111             :       const tnsr::I<DataVector, 3, Frame::Inertial>& tilde_j,
     112             :       const double kappa_psi, const double kappa_phi,
     113             :       const double parallel_conductivity,
     114             : 
     115             :       const Scalar<DataVector>& lapse,
     116             :       const tnsr::I<DataVector, 3, Frame::Inertial>& shift,
     117             :       const Scalar<DataVector>& sqrt_det_spatial_metric,
     118             :       const tnsr::ii<DataVector, 3, Frame::Inertial>& spatial_metric,
     119             :       const tnsr::II<DataVector, 3, Frame::Inertial>& inv_spatial_metric,
     120             :       const tnsr::ii<DataVector, 3, Frame::Inertial>& extrinsic_curvature,
     121             :       const tnsr::i<DataVector, 3, Frame::Inertial>& d_lapse,
     122             :       const tnsr::iJ<DataVector, 3, Frame::Inertial>& d_shift,
     123             :       const tnsr::ijj<DataVector, 3, Frame::Inertial>& d_spatial_metric);
     124             : };
     125             : 
     126             : }  // namespace ForceFree

Generated by: LCOV version 1.14