SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
grmhd::ValenciaDivClean::Flattener< RecoverySchemesList > Class Template Reference

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...

#include <Flattener.hpp>

Classes

struct  RecoverPrimitives
 If true, then the primitive variables are updated at the end of the function. More...
struct  RequirePhysicalMeanTildeTau
 Require that the mean of TildeTau is physical, otherwise terminate the simulation. More...
struct  RequirePositiveMeanTildeD
 Require that the mean of TildeD is positive, otherwise terminate the simulation. More...
struct  RequirePositiveMeanTildeYe
 Require that the mean of TildeYe is positive, otherwise terminate the simulation. More...

Public Types

using options
using return_tags
using argument_tags

Public Member Functions

 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
Flatteneroperator= (const Flattener &)=default
 Flattener (Flattener &&)=default
Flatteneroperator= (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

Static Public Attributes

static constexpr Options::String help

Friends

template<typename LocalRecoverySchemesList>
bool operator== (const Flattener< LocalRecoverySchemesList > &lhs, const Flattener< LocalRecoverySchemesList > &rhs)

Detailed Description

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.

Member Typedef Documentation

◆ argument_tags

template<typename RecoverySchemesList>
using grmhd::ValenciaDivClean::Flattener< RecoverySchemesList >::argument_tags
Initial value:
tmpl::list<
The densitized divergence cleaning field associated with the magnetic field.
Definition Tags.hpp:93
The determinant of the inverse Jacobian from the source frame to the target frame.
Definition Tags.hpp:189
The computational grid of the Element in the DataBox.
Definition Tags.hpp:62
Inverse of the spatial metric.
Definition Tags.hpp:32
Definition Tags.hpp:25
Definition Tags.hpp:43
The densitized magnetic field .
Definition Tags.hpp:56
The equation of state retrieved from the analytic solution / data in the input file.
Definition Tags.hpp:343

◆ options

template<typename RecoverySchemesList>
using grmhd::ValenciaDivClean::Flattener< RecoverySchemesList >::options
Initial value:
If true, then the primitive variables are updated at the end of the function.
Definition Flattener.hpp:91
Require that the mean of TildeTau is physical, otherwise terminate the simulation.
Definition Flattener.hpp:79
Require that the mean of TildeD is positive, otherwise terminate the simulation.
Definition Flattener.hpp:61
Require that the mean of TildeYe is positive, otherwise terminate the simulation.
Definition Flattener.hpp:70

◆ return_tags

template<typename RecoverySchemesList>
using grmhd::ValenciaDivClean::Flattener< RecoverySchemesList >::return_tags
Initial value:
Definition VariablesTag.hpp:17
The densitized rest-mass density .
Definition Tags.hpp:32
The densitized momentum density .
Definition Tags.hpp:49
The densitized energy density .
Definition Tags.hpp:43
The densitized electron number density times the baryon mass .
Definition Tags.hpp:38

Member Data Documentation

◆ help

template<typename RecoverySchemesList>
Options::String grmhd::ValenciaDivClean::Flattener< RecoverySchemesList >::help
staticconstexpr
Initial value:
= {
"Reduces oscillations (flattens) the conserved variables according to "
"the variable fixing procedure described in Foucart's thesis.\n"}

The documentation for this class was generated from the following file:
  • src/Evolution/Systems/GrMhd/ValenciaDivClean/Flattener.hpp