#include <flowData.h>
Public Member Functions | |
flowData (void) | |
~flowData (void) | |
bool | loadGridData (std::string gridFile) |
bool | loadDatData (std::string datFile) |
double | getGridWidth () |
double | getGridHeight () |
double | getGridMinX () |
double | getGridMinY () |
double | getGridMaxX () |
double | getGridMaxY () |
bool | hasData () |
vector5f | getGridValue (int x, int y, int z) |
vector5f | getDataValue (int x, int y, int z) |
vector5f | getValue (float pointX, float pointY) |
vector5f | interpolate (vector5f v1, vector5f v2, float coeff) |
float | getPressureValue (int x, int y, int z) |
float | getVorticityValue (int x, int y, int z) |
Public Attributes | |
float | maxPressure |
float | minPressure |
float | maxVorticity |
float | minVorticity |
float | maxVelocity |
Private Attributes | |
int | SX |
int | SY |
int | SZ |
double | minX |
double | minY |
double | maxX |
double | maxY |
int | NF |
int | NT |
float | DT |
float * | gridData |
float * | datData |
bool | dataIsSet |
bool | gridIsSet |
flowData::flowData | ( | void | ) |
constructor
flowData::~flowData | ( | void | ) |
destructor
bool flowData::loadGridData | ( | std::string | gridFile | ) |
This function is called when the user wants to load a grid file.
First the header of the file is read to get the dimensions of the grid, then the file is parsed and the grid data is saved in an array.
gridFile | the url of the gridfile |
bool flowData::loadDatData | ( | std::string | datFile | ) |
This function is called when the user wants to load a grid file.
The file is parsed and the stream data is saved in an array.
datFile | the url of the datfile |
double flowData::getGridWidth | ( | ) |
Returns the Width of the Grid.
double flowData::getGridHeight | ( | ) |
Returns the Height of the Grid.
double flowData::getGridMinX | ( | ) |
Returns the minimal value of the Grid on the x axis.
double flowData::getGridMinY | ( | ) |
Returns the minimal value of the Grid on the y axis.
double flowData::getGridMaxX | ( | ) |
Returns the maximal value of the Grid on the x axis.
double flowData::getGridMaxY | ( | ) |
Returns the maximal value on the Grid on the y axis.
bool flowData::hasData | ( | ) |
Returns a boolean if the streamdata is loaded successfully.
vector5f flowData::getGridValue | ( | int | x, | |
int | y, | |||
int | z | |||
) |
Returns the data of a specific point in the grid.
x | the number of the position on the xaxis | |
y | the number of the position on the yaxis | |
z | the number of the position on the zaxis |
vector5f flowData::getDataValue | ( | int | x, | |
int | y, | |||
int | z | |||
) |
Returns the data of a specific point in the datfile
x | the number of the position on the xaxis | |
y | the number of the position on the yaxis | |
z | the number of the position on the zaxis |
vector5f flowData::getValue | ( | float | pointX, | |
float | pointY | |||
) |
Returns the streamdata for a specific gridposition.
pointX | the coordinate of the streamdata on the x axis | |
pointY | the coordinate of the streamdata on the y axis |
Function to interpolate between to vectors. The coefficient for the first vector is given.
v1 | the first vector | |
v2 | the second vector | |
coeff | the coefficient for the first vector |
float flowData::getPressureValue | ( | int | x, | |
int | y, | |||
int | z | |||
) |
Returns the pressureValue for a specific point in the datfile
x | the number of the position on the xaxis | |
y | the number of the position on the yaxis | |
z | the number of the position on the zaxis |
float flowData::getVorticityValue | ( | int | x, | |
int | y, | |||
int | z | |||
) |
Returns the vorticity value for a specific point the datfile
x | the number of the position on the xaxis | |
y | the number of the position on the yaxis | |
z | the number of the position on the zaxis |
float flowData::maxPressure |
float flowData::minPressure |
maximum pressure value in the datfile
float flowData::maxVorticity |
minimum pressure value in the datfile
float flowData::minVorticity |
maximum vorticity value in the datfile
float flowData::maxVelocity |
minimum vorticity value in the datfile
int flowData::SX [private] |
maximum lenght of the velocity vector in the datfile
int flowData::SY [private] |
dimension of the dat and grid file in the xaxis
int flowData::SZ [private] |
dimension of the dat and grid file in the yaxis
double flowData::minX [private] |
dimension of the dat and grid file in the zaxis
double flowData::minY [private] |
the smallest xAxis position in the grid file
double flowData::maxX [private] |
the biggest yAxis position in the grid file
double flowData::maxY [private] |
the smallest xAxis position in the grid file
int flowData::NF [private] |
the biggest yAxis position in the grid file
int flowData::NT [private] |
number of additional datasets
float flowData::DT [private] |
number of time steps
float* flowData::gridData [private] |
time step between two time steps
float* flowData::datData [private] |
array where the grid data is stored
bool flowData::dataIsSet [private] |
array where the stream data is stored
bool flowData::gridIsSet [private] |
bool which tells if the the dataFile is loaded