SpECTRE
v2025.03.17
|
Mutator that, if the active mesh is subcell, resizes the primitive variables to have the size of the subcell and then computes the primitive variables. More...
#include <ResizeAndComputePrimitives.hpp>
Public Types | |
using | return_tags = implementation defined |
using | argument_tags = implementation defined |
Static Public Member Functions | |
static void | apply (gsl::not_null< Variables< hydro::grmhd_tags< DataVector > > * > prim_vars, evolution::dg::subcell::ActiveGrid active_grid, const Mesh< 3 > &dg_mesh, const Mesh< 3 > &subcell_mesh, const Scalar< DataVector > &tilde_d, const Scalar< DataVector > &tilde_ye, const Scalar< DataVector > &tilde_tau, const tnsr::i< DataVector, 3, Frame::Inertial > &tilde_s, const tnsr::I< DataVector, 3, Frame::Inertial > &tilde_b, const Scalar< DataVector > &tilde_phi, const tnsr::ii< DataVector, 3, Frame::Inertial > &spatial_metric, const tnsr::II< DataVector, 3, Frame::Inertial > &inv_spatial_metric, const Scalar< DataVector > &sqrt_det_spatial_metric, const EquationsOfState::EquationOfState< true, 3 > &eos, const grmhd::ValenciaDivClean::PrimitiveFromConservativeOptions &primitive_from_conservative_options) |
Mutator that, if the active mesh is subcell, resizes the primitive variables to have the size of the subcell and then computes the primitive variables.
In the DG-subcell step_actions
list this will normally be called using the Actions::MutateApply
action in the following way in the action list:
TciAndSwitchToDg<TciOnFdGrid>
Actions::MutateApply<grmhd::ValenciaDivClean::subcell::SwapGrTags>
Actions::MutateApply<ResizeAndComputePrims<primitive_recovery_schemes>>
Note that the GR tags are swapped before this action is called.If the active grid is DG (we are switching from subcell back to DG) then this mutator computes the primitive variables on the active grid. We reconstruct the pressure to the DG grid to give a high-order initial guess for the primitive recovery. A possible future optimization would be to avoid this reconstruction when all recovery schemes don't need an initial guess. Finally, we perform the primitive recovery on the DG grid.