5 #ifndef HYDRODYNAMIC_VARIABLES_HPP 6 #define HYDRODYNAMIC_VARIABLES_HPP 1 8 #include "../../tessellation/geometry.hpp" 66 enum {NUMBER_PRIMITIVE_VARIABLES=6};
81 double sound_speed_i);
100 int GetVarNo(
void)
const;
119 double& operator[](
int index);
132 double operator[](
int index)
const;
241 #endif // HYDRODYNAMIC_VARIABLES_HPP Set of conserved variables (extensive)
Vector2D Momentum
Momentum.
double SoundSpeed
Speed of sound.
bool primitive_has_nan(Primitive const &p)
Checks if on of the fields of Primitive is a nan.
Primitive operator-(Primitive const &p1, Primitive const &p2)
Term by term subtraction.
Conserved & operator-=(Conserved const &c)
subtraction of flux
Primitive operator*(Primitive const &p, double s)
Scalar multiplication on the right.
Vector2D Velocity
Velocity.
double Energy
Total energy (kinetic + thermal)
double TotalEnergyDensity(Primitive const &p)
Calculates the total energy density.
Conserved Primitive2Conserved(Primitive const &p)
Converts primitive variables to conserved intensive.
Conserved & operator+=(Conserved const &f)
Addition of flux.
Conserved Primitive2Flux(Primitive const &p, Vector2D const &n)
Converts primitive variables to flux.
Conserved & operator=(Conserved const &other)
Assigmnet operator.
Primitive operator/(Primitive const &p, double s)
Scalar division.
double Energy
Thermal energy per unit mass, entahalpy in relativistic case.
Primitive hydrodynamic variables.
Primitive operator+(Primitive const &p1, Primitive const &p2)
Term by term addition.
Conserved(void)
Null constructor (sets all members to zero)