lbm_reference
|
3-dimensional grid of Cells with template specifyable number of cell variables and type More...
#include <Grid.h>
Public Member Functions | |
int | getSizeX () |
Get size in x-dimension. More... | |
int | getSizeY () |
Get size in y-dimension. More... | |
int | getSizeZ () |
Get size in z-dimension. More... | |
Grid () | |
Default constructor. More... | |
Grid (int sizeX, int sizeY, int sizeZ) | |
Constructor to specify grid dimensions. More... | |
Grid (int sizeX, int sizeY, int sizeZ, T val) | |
Constructor to specify grid dimensions and initialization value. More... | |
void | init (int sizeX, int sizeY, int sizeZ, T val) |
Initialize the grid with given dimensions and initial value. More... | |
void | init (T val) |
Initialize the grid with given initial value. More... | |
T & | operator() (int x, int y, int z, int f) |
Get specified cell variable of specified cell. More... | |
const T & | operator() (int x, int y, int z, int f) const |
Get specified const cell variable of specified cell. More... | |
virtual | ~Grid () |
Destructor. More... | |
Protected Attributes | |
std::vector< T > | data_ |
Linearized, 1-dimensional representation of the 3D data grid. More... | |
int | sizeX_ |
Number of cells in x-dimension. More... | |
int | sizeY_ |
Number of cells in y-dimension. More... | |
int | sizeZ_ |
Number of cells in z-dimension. More... | |
3-dimensional grid of Cells with template specifyable number of cell variables and type
T | Type of cell variables |
Cellsize | Number of cell variables |
Default constructor.
Creates a grid with zero cells in each dimension
Definition at line 17 of file Grid_def.h.
Constructor to specify grid dimensions.
[in] | sizeX | Grid size in x-dimension |
[in] | sizeY | Grid size in y-dimension |
[in] | sizeZ | Grid size in z-dimension |
Definition at line 22 of file Grid_def.h.
Grid< T, Cellsize >::Grid | ( | int | sizeX, |
int | sizeY, | ||
int | sizeZ, | ||
T | val | ||
) |
Constructor to specify grid dimensions and initialization value.
[in] | sizeX | Grid size in x-dimension |
[in] | sizeY | Grid size in y-dimension |
[in] | sizeZ | Grid size in z-dimension |
[in] | val | Initial value for all cell variables |
Definition at line 30 of file Grid_def.h.
|
inline |
|
inline |
|
inline |
void Grid< T, Cellsize >::init | ( | int | sizeX, |
int | sizeY, | ||
int | sizeZ, | ||
T | val | ||
) |
Initialize the grid with given dimensions and initial value.
[in] | sizeX | Grid size in x-dimension |
[in] | sizeY | Grid size in y-dimension |
[in] | sizeZ | Grid size in z-dimension |
[in] | val | Initial value for all cell variables |
Definition at line 50 of file Grid_def.h.
Referenced by lbm::LBM< T >::setup().
void Grid< T, Cellsize >::init | ( | T | val | ) |
Initialize the grid with given initial value.
[in] | val | Initial value for all cell variables |
Definition at line 58 of file Grid_def.h.
|
inline |
Get specified cell variable of specified cell.
[in] | x | Cell coordinate in x-dimension |
[in] | y | Cell coordinate in y-dimension |
[in] | z | Cell coordinate in z-dimension |
[in] | f | Cell variable index |
Definition at line 67 of file Grid_def.h.
|
inline |
Get specified const cell variable of specified cell.
[in] | x | Cell coordinate in x-dimension |
[in] | y | Cell coordinate in y-dimension |
[in] | z | Cell coordinate in z-dimension |
[in] | f | Cell variable index |
Definition at line 77 of file Grid_def.h.
|
protected |
Linearized, 1-dimensional representation of the 3D data grid.
Definition at line 142 of file Grid.h.
Referenced by Grid< T, 1 >::init(), Grid< T, 1 >::operator()(), and Grid< T, 1 >::~Grid().
|
protected |
Number of cells in x-dimension.
Definition at line 130 of file Grid.h.
Referenced by Grid< float, 3 >::getSizeX(), Grid< T, 1 >::getSizeX(), Grid< T, 1 >::init(), Grid< T, 1 >::operator()(), and Grid< T, 1 >::~Grid().
|
protected |
Number of cells in y-dimension.
Definition at line 134 of file Grid.h.
Referenced by Grid< float, 3 >::getSizeY(), Grid< T, 1 >::getSizeY(), Grid< T, 1 >::init(), Grid< T, 1 >::operator()(), and Grid< T, 1 >::~Grid().
|
protected |
Number of cells in z-dimension.
Definition at line 138 of file Grid.h.
Referenced by Grid< float, 3 >::getSizeZ(), Grid< T, 1 >::getSizeZ(), Grid< T, 1 >::init(), Grid< T, 1 >::operator()(), and Grid< T, 1 >::~Grid().