SpECTRE  2021.08.02
grmhd::GhValenciaDivClean::TimeDerivativeTerms Struct Reference

Compute the RHS terms and flux values for both the Generalized Harmonic formulation of Einstein's equations and the Valencia formulation of the GRMHD equations with divergence cleaning. More...

#include <TimeDerivativeTerms.hpp>

Public Types

using valencia_dt_tags = db::wrap_tags_in< ::Tags::dt, typename grmhd::ValenciaDivClean::System::variables_tag::tags_list >
 
using valencia_flux_tags = tmpl::transform< typename grmhd::ValenciaDivClean::System::flux_variables, tmpl::bind<::Tags::Flux, tmpl::_1, tmpl::pin< tmpl::size_t< 3_st > >, tmpl::pin< Frame::Inertial > > >
 
using gh_dt_tags = db::wrap_tags_in< ::Tags::dt, typename GeneralizedHarmonic::System< 3_st >::variables_tag::tags_list >
 
using gh_temp_tags = typename GeneralizedHarmonic::TimeDerivative< 3_st >::temporary_tags
 
using gh_gradient_tags = typename GeneralizedHarmonic::System< 3_st >::gradients_tags
 
using gh_arg_tags = typename GeneralizedHarmonic::TimeDerivative< 3_st >::argument_tags
 
using valencia_temp_tags = db::wrap_tags_in< detail::ValenciaTempTag, typename grmhd::ValenciaDivClean::TimeDerivativeTerms::temporary_tags >
 
using valencia_arg_tags = tmpl::list_difference< typename grmhd::ValenciaDivClean::TimeDerivativeTerms::argument_tags, gh_temp_tags >
 
using temporary_tags = tmpl::flatten< tmpl::list< gh_temp_tags, valencia_temp_tags, Tags::TraceReversedStressEnergy, Tags::FourVelocityOneForm, Tags::ComovingMagneticFieldOneForm > >
 
using argument_tags = tmpl::append< gh_arg_tags, valencia_arg_tags >
 

Static Public Member Functions

template<typename... Args>
static void apply (Args &&... args) noexcept
 

Detailed Description

Compute the RHS terms and flux values for both the Generalized Harmonic formulation of Einstein's equations and the Valencia formulation of the GRMHD equations with divergence cleaning.

Details

The bulk of the computations in this class dispatch to GeneralizedHarmonic::TimeDerivative and grmhd::ValenciaDivClean::TimeDerivativeTerms as a 'product system' – each independently operating on its own subset of the supplied variable collections. The additional step is taken to compute the trace-reversed stress energy tensor associated with the GRMHD part of the system and add its contribution to the \(\partial_t \Pi_{a b}\) variable in the Generalized Harmonic system, which is the only explicit coupling required to back-react the effect of matter on the spacetime solution.

Note
The MHD calculation reuses any spacetime quantities in its argument_tags that are computed by the GH time derivative. However, other quantities that aren't computed by the GH time derivative like the extrinsic curvature are currently still retrieved from the DataBox. Those calculations can be explicitly inlined here to reduce memory pressure and the number of compute tags.