CSol
|
Bushfire computational tile.
#include <bf/csol_bf.h>
Public Types | |
enum | bufferType { bFront, bClass, bArrival, bOut, bUser } |
Tile buffer types. More... | |
enum | direction { North, South, West, East } |
Tile directions. More... | |
Public Member Functions | |
BF_Tile (CSol_Solver &, int, int) | |
Bushfire tile constructor. More... | |
virtual | ~BF_Tile () |
void | deleteTile () |
De-activates the tile. More... | |
REAL | get_hx () |
Returns tile spacing in x-direction. More... | |
REAL | get_hy () |
Returns tile spacing in y-direction. More... | |
bool | get_isAlive () |
Returns true if tile is active, false otherwise. More... | |
REAL | get_ox () |
Returns global tile offset in x-direction. More... | |
REAL | get_oy () |
Returns global tile offset in y-direction. More... | |
virtual cl::Buffer *const | get_pbrand ()=0 |
virtual cl::Buffer *const | get_pbw_u ()=0 |
virtual cl::Buffer *const | get_pbw_v ()=0 |
int | get_size () |
Returns tile dimensions. More... | |
int | get_tx () |
Returns integer tile offset in x-direction. More... | |
int | get_ty () |
Returns integer tile offset in y-direction. More... | |
bool | hasNeighbourE () |
Returns true if tile has a east neighbour, false otherwise. More... | |
bool | hasNeighbourN () |
Returns true if tile has a north neighbour, false otherwise. More... | |
bool | hasNeighbourNE () |
Returns true if tile has a north-east neighbour, false otherwise. More... | |
bool | hasNeighbourNW () |
Returns true if tile has a north-west neighbour, false otherwise. More... | |
bool | hasNeighbourS () |
Returns true if tile has a south neighbour, false otherwise. More... | |
bool | hasNeighbourSE () |
Returns true if tile has a south-east neighbour, false otherwise. More... | |
bool | hasNeighbourSW () |
Returns true if tile has a south-west neighbour, false otherwise. More... | |
bool | hasNeighbourW () |
Returns true if tile has a west neighbour, false otherwise. More... | |
void | setNeighbourE (BF_Tile *pTile) |
Sets tile east neighbour. More... | |
void | setNeighbourN (BF_Tile *pTile) |
Sets tile north neighbour. More... | |
void | setNeighbourNE (BF_Tile *pTile) |
Sets tile north-east neighbour. More... | |
void | setNeighbourNW (BF_Tile *pTile) |
Sets tile north-west neighbour. More... | |
void | setNeighbours (std::map< BF::int64, BF_Tile * > &) |
Sets tile neighbours. More... | |
void | setNeighbourS (BF_Tile *pTile) |
Sets tile south neighbour. More... | |
void | setNeighbourSE (BF_Tile *pTile) |
Sets tile south-east neighbour. More... | |
void | setNeighbourSW (BF_Tile *pTile) |
Sets tile south-west neighbour. More... | |
void | setNeighbourW (BF_Tile *pTile) |
Sets tile west neighbour. More... | |
Protected Attributes | |
cl::Context & | context |
REAL | hx |
REAL | hy |
Cell spacing in world units. More... | |
bool | isAlive |
Active flag. More... | |
int | localSize |
OpenCL group size. More... | |
REAL | ox |
REAL | oy |
Tile origin in world units. More... | |
BF_Tile * | pTileE |
BF_Tile * | pTileN |
BF_Tile * | pTileNE |
BF_Tile * | pTileNW |
BF_Tile * | pTileS |
BF_Tile * | pTileSE |
BF_Tile * | pTileSW |
BF_Tile * | pTileW |
cl::CommandQueue & | queue |
int | tileSize |
Number of cells in each tile. More... | |
int | tx |
int | ty |
Cell offset in tile world units. More... | |
enum bufferType |
enum direction |
BF_Tile | ( | CSol_Solver & | solver_, |
int | tx_, | ||
int | ty_ | ||
) |
Creates a two-dimensional computational tile for the bushfire solver. Each tile has equal x and y dimensions of 'tileSize' with x and y spacings of 'hx' and 'hy', respectively. Every tile is reference according to the first tile created in the simulation. This first tile has a integer location of (0, 0) along with a global offset from the lower-left corner which is passed to this constructor for each subsequent tile creation.
solver_ | the parent solver instance. |
tx_ | the integer x-location of the tile with respect to the first tile created. |
ty_ | the integer y-location of the tile with respect to the first tile created. |
|
inlinevirtual |
void deleteTile | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
pure virtual |
Implemented in BF_Fire_Tile, BF_Potential_Tile, and BF_Wind_Tile.
|
pure virtual |
Implemented in BF_Fire_Tile, BF_Potential_Tile, and BF_Wind_Tile.
|
pure virtual |
Implemented in BF_Fire_Tile, BF_Potential_Tile, and BF_Wind_Tile.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
This detects the tile neighbours based on the input hash map of tile locations. Once a tile neighbour is detected, the corresponding pointers within the neighbour are set to point to the tile.
tiles | map of all tiles. |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |