Primitive hydrodynamic variables. More...
#include <hydrodynamic_variables.hpp>
Public Types | |
enum | { NUMBER_PRIMITIVE_VARIABLES =6 } |
Stores the number of variables. | |
Public Member Functions | |
Primitive (double density_i, double pressure_i, Vector2D const &velocity_i, double energy_i, double sound_speed_i) | |
Class constructor. More... | |
int | GetVarNo (void) const |
Returns the numbers of members. More... | |
Primitive & | operator+= (Primitive const &p) |
Operator for adding members of two primitives. More... | |
double & | operator[] (int index) |
Subscript operator. More... | |
double | operator[] (int index) const |
Subscript operator. More... | |
Primitive & | operator= (Primitive const &other) |
Assigmnet operator. More... | |
Primitive (const Primitive &other) | |
Copy constructor. More... | |
Public Attributes | |
double | Density |
Density. | |
double | Pressure |
Pressure. | |
Vector2D | Velocity |
Velocity. | |
double | Energy |
Thermal energy per unit mass, entahalpy in relativistic case. | |
double | SoundSpeed |
Speed of sound. | |
Primitive hydrodynamic variables.
Definition at line 61 of file hydrodynamic_variables.hpp.
Primitive::Primitive | ( | double | density_i, |
double | pressure_i, | ||
Vector2D const & | velocity_i, | ||
double | energy_i, | ||
double | sound_speed_i | ||
) |
Class constructor.
density_i | Density |
pressure_i | Pressure |
velocity_i | Velocity |
energy_i | Energy |
sound_speed_i | Sound speed |
Definition at line 13 of file hydrodynamic_variables.cpp.
Primitive::Primitive | ( | const Primitive & | other | ) |
Copy constructor.
other | Source from which to copy |
Definition at line 72 of file hydrodynamic_variables.cpp.
int Primitive::GetVarNo | ( | void | ) | const |
Returns the numbers of members.
Definition at line 24 of file hydrodynamic_variables.cpp.
Operator for adding members of two primitives.
p | Another primitive |
Definition at line 79 of file hydrodynamic_variables.cpp.
Assigmnet operator.
other | The object to be copied |
Definition at line 29 of file hydrodynamic_variables.cpp.
double & Primitive::operator[] | ( | int | index | ) |
Subscript operator.
Enumerates the variables 0 - Density 1 - Pressure 2 - Energy 3 - Sound speed 4 - x Velocity 5 - y Velocity
index | Parameter index |
Definition at line 90 of file hydrodynamic_variables.cpp.
double Primitive::operator[] | ( | int | index | ) | const |
Subscript operator.
Enumerates the variables 0 - Density 1 - Pressure 2 - Energy 3 - Sound speed 4 - x Velocity 5 - y Velocity
index | Parameter index |
Definition at line 108 of file hydrodynamic_variables.cpp.