|
SpECTRE
2021.08.02
|
Compute the primitive variables from the conservative variables. More...
#include <PrimitiveFromConservative.hpp>
Public Types | |
| using | return_tags = tmpl::list< hydro::Tags::RestMassDensity< DataVector >, hydro::Tags::SpecificInternalEnergy< DataVector >, hydro::Tags::SpatialVelocity< DataVector, 3 >, hydro::Tags::MagneticField< DataVector, 3 >, hydro::Tags::DivergenceCleaningField< DataVector >, hydro::Tags::LorentzFactor< DataVector >, hydro::Tags::Pressure< DataVector >, hydro::Tags::SpecificEnthalpy< DataVector > > |
| using | argument_tags = tmpl::list< grmhd::ValenciaDivClean::Tags::TildeD, grmhd::ValenciaDivClean::Tags::TildeTau, grmhd::ValenciaDivClean::Tags::TildeS<>, grmhd::ValenciaDivClean::Tags::TildeB<>, grmhd::ValenciaDivClean::Tags::TildePhi, gr::Tags::SpatialMetric< 3 >, gr::Tags::InverseSpatialMetric< 3 >, gr::Tags::SqrtDetSpatialMetric<>, hydro::Tags::EquationOfStateBase > |
Static Public Member Functions | |
| template<size_t ThermodynamicDim> | |
| static bool | apply (gsl::not_null< Scalar< DataVector > * > rest_mass_density, gsl::not_null< Scalar< DataVector > * > specific_internal_energy, gsl::not_null< tnsr::I< DataVector, 3, Frame::Inertial > * > spatial_velocity, gsl::not_null< tnsr::I< DataVector, 3, Frame::Inertial > * > magnetic_field, gsl::not_null< Scalar< DataVector > * > divergence_cleaning_field, gsl::not_null< Scalar< DataVector > * > lorentz_factor, gsl::not_null< Scalar< DataVector > * > pressure, gsl::not_null< Scalar< DataVector > * > specific_enthalpy, const Scalar< DataVector > &tilde_d, 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, ThermodynamicDim > &equation_of_state) noexcept |
Compute the primitive variables from the conservative variables.
For the Valencia formulation of the GRMHD system with divergence cleaning, the conversion of the evolved conserved variables to the primitive variables cannot be expressed in closed analytic form and requires a root find.
Siegel {et al}, The Astrophysical Journal 859:71(2018) compares several inversion methods.
If ErrorOnFailure is false then the returned bool will be false if recovery failed and true if it succeeded.