Reduces oscillations inside an element in an attempt to guarantee a physical solution of the conserved variables for which the primitive variables can be recovered.
More...
|
| Flattener (bool require_positive_mean_tilde_d, bool require_positive_mean_tilde_ye, bool require_physical_mean_tilde_tau, bool recover_primitives) |
|
| Flattener (const Flattener &)=default |
|
Flattener & | operator= (const Flattener &)=default |
|
| Flattener (Flattener &&)=default |
|
Flattener & | operator= (Flattener &&)=default |
|
void | pup (PUP::er &p) |
|
void | operator() (gsl::not_null< Scalar< DataVector > * > tilde_d, gsl::not_null< Scalar< DataVector > * > tilde_ye, gsl::not_null< Scalar< DataVector > * > tilde_tau, gsl::not_null< tnsr::i< DataVector, 3 > * > tilde_s, gsl::not_null< Variables< hydro::grmhd_tags< DataVector > > * > primitives, const tnsr::I< DataVector, 3, Frame::Inertial > &tilde_b, const Scalar< DataVector > &tilde_phi, const Scalar< DataVector > &sqrt_det_spatial_metric, const tnsr::ii< DataVector, 3, Frame::Inertial > &spatial_metric, const tnsr::II< DataVector, 3, Frame::Inertial > &inv_spatial_metric, const Mesh< 3 > &mesh, const Scalar< DataVector > &det_logical_to_inertial_inv_jacobian, const EquationsOfState::EquationOfState< true, 3 > &eos, const grmhd::ValenciaDivClean::PrimitiveFromConservativeOptions &primitive_from_conservative_options) const |
|
template<typename RecoverySchemesList>
class grmhd::ValenciaDivClean::Flattener< RecoverySchemesList >
Reduces oscillations inside an element in an attempt to guarantee a physical solution of the conserved variables for which the primitive variables can be recovered.
The algorithm uses the conditions of FixConservatives on \(\tilde{D}\) and \(\tilde{\tau}\) to reduce oscillations inside an element. Oscillations are reduced by rescaling the conserved variables about the mean to bring them into the required range. When rescaling \(\tilde{D}\) because it is negative, it is important to also rescale \(\tilde{\tau}\) and \(\tilde{S}_i\) by the same amount. At least, this is what is observed in the cylindrical blast wave test problem.
This currently doesn't use the check on \(\tilde{S}^2\), but instead checks that the primitive variables can be recovered. If the primitives cannot be recovered then we flatten to the mean values in the element.