SpECTRE
v2024.05.11
|
Fix conservative variables using the method proposed in F. Foucart's PhD thesis (Cornell) More...
#include <FixConservatives.hpp>
Classes | |
struct | CutoffD |
The cutoff below which \(D\) is set to MinimumValueOfD More... | |
struct | MinimumValueOfD |
The minimum value of the rest mass density times the Lorentz factor, \(D\). More... | |
struct | SafetyFactorForS |
The safety factor to fix \(\tilde S_i\). More... | |
Public Types | |
using | options = tmpl::list< MinimumValueOfD, CutoffD, SafetyFactorForS > |
using | return_tags = tmpl::list< RelativisticEuler::Valencia::Tags::TildeD, RelativisticEuler::Valencia::Tags::TildeTau, RelativisticEuler::Valencia::Tags::TildeS< Dim > > |
using | argument_tags = tmpl::list< gr::Tags::InverseSpatialMetric< DataVector, Dim >, gr::Tags::SqrtDetSpatialMetric< DataVector > > |
Public Member Functions | |
FixConservatives (const FixConservatives &)=default | |
FixConservatives & | operator= (const FixConservatives &)=default |
FixConservatives (FixConservatives &&)=default | |
FixConservatives & | operator= (FixConservatives &&)=default |
FixConservatives (double minimum_rest_mass_density_times_lorentz_factor, double rest_mass_density_times_lorentz_factor_cutoff, double safety_factor_for_momentum_density, const Options::Context &context={}) | |
void | pup (PUP::er &p) |
void | operator() (gsl::not_null< Scalar< DataVector > * > tilde_d, gsl::not_null< Scalar< DataVector > * > tilde_tau, gsl::not_null< tnsr::i< DataVector, Dim, Frame::Inertial > * > tilde_s, const tnsr::II< DataVector, Dim, Frame::Inertial > &inv_spatial_metric, const Scalar< DataVector > &sqrt_det_spatial_metric) const |
Static Public Attributes | |
static constexpr Options::String | help |
Friends | |
template<size_t SpatialDim> | |
bool | operator== (const FixConservatives< SpatialDim > &lhs, const FixConservatives< SpatialDim > &rhs) |
Fix conservative variables using the method proposed in F. Foucart's PhD thesis (Cornell)
Fix the conservative variables at each grid point according to the following recipe:
If \(\tilde S^2 > \tilde S_\text{max}^2 = \tilde\tau(\tilde\tau + 2\tilde D)\), rescale \(\tilde S_i\) by the factor
\begin{align*} f = \sqrt{\frac{(1 - \epsilon)\tilde S_\text{max}^2}{\tilde S^2 + 10^{-16}\tilde D^2}} < 1 \end{align*}
(if \( f\geq 1\), do not fix \(\tilde S_i\)), where \(D_\text{min}\), \(D_\text{cutoff}\) and \(\epsilon\) are small and positive input parameters, typically chosen in consistency with some variable fixing applied to the primitives variables (e.g. VariableFixing::FixToAtmosphere). Note that, in order to fix \(\tilde S_i\), \(\epsilon\) is chosen so that \(1 - \epsilon\) (the relevant quantity used in the equations) is sufficiently close (but smaller) than 1.
|
staticconstexpr |