Public Types | Public Member Functions | Public Attributes | List of all members
Primitive Class Reference

Primitive hydrodynamic variables. More...

#include <hydrodynamic_variables.hpp>

Collaboration diagram for Primitive:
Collaboration graph
[legend]

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...
 
Primitiveoperator+= (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...
 
Primitiveoperator= (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.
 

Detailed Description

Primitive hydrodynamic variables.

Definition at line 61 of file hydrodynamic_variables.hpp.

Constructor & Destructor Documentation

◆ Primitive() [1/2]

Primitive::Primitive ( double  density_i,
double  pressure_i,
Vector2D const &  velocity_i,
double  energy_i,
double  sound_speed_i 
)

Class constructor.

Parameters
density_iDensity
pressure_iPressure
velocity_iVelocity
energy_iEnergy
sound_speed_iSound speed

Definition at line 13 of file hydrodynamic_variables.cpp.

◆ Primitive() [2/2]

Primitive::Primitive ( const Primitive other)

Copy constructor.

Parameters
otherSource from which to copy

Definition at line 72 of file hydrodynamic_variables.cpp.

Member Function Documentation

◆ GetVarNo()

int Primitive::GetVarNo ( void  ) const

Returns the numbers of members.

Returns
Number of variables

Definition at line 24 of file hydrodynamic_variables.cpp.

Here is the caller graph for this function:

◆ operator+=()

Primitive & Primitive::operator+= ( Primitive const &  p)

Operator for adding members of two primitives.

Parameters
pAnother primitive
Returns
Reference to primitive variables

Definition at line 79 of file hydrodynamic_variables.cpp.

◆ operator=()

Primitive & Primitive::operator= ( Primitive const &  other)

Assigmnet operator.

Parameters
otherThe object to be copied
Returns
The copy

Definition at line 29 of file hydrodynamic_variables.cpp.

◆ operator[]() [1/2]

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

Parameters
indexParameter index
Returns
Reference to variable

Definition at line 90 of file hydrodynamic_variables.cpp.

◆ operator[]() [2/2]

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

Parameters
indexParameter index
Returns
Value of variable

Definition at line 108 of file hydrodynamic_variables.cpp.


The documentation for this class was generated from the following files: