SCellGrid¶
This page describes the class SCellGrid
The SCellGrid
represents the grid on which the simulation is taking place.
QHG supports flat grids with 4 or 6 neighborhoods, as well as icosahedral grids.
It is also possible to use irregular grids - in principle any graph could be used.

QDF files containing regular cell grids can be created with the tool Def2QDF.
- Code:
Public Members¶
int m_iID;
The cell grid’s ID
uint m_iNumCells;
The number of cells in the grid.
SCell *m_aCells;
The array of SCell objects.
int m_iType;
The type of the grid: cartesian with 4-neighborhood (0), cartesian with 6-neighborhood (1, subdivided icosahedron(3).
int m_iConnectivity;
The grid’s connectivity (4 or 6).
Public Methods¶
constructor
¶
SCellGrid(int iID, uint iNumCells, const stringmap &smSurfaceData);
iID
ID of grid (currently nor relevant - might be used for MPI parallelization).
iNumCells
Number of cells in grid.
smSurfaceData
String data (name=>value).
Allocates the array of SCell
objects, stores ID and surface data.
This constructor is only used to prepare the array of cells for later input. In QHG the GridGroupReader reads the relevant data as well as the SCells and their neighorhood relations gfrom a QDF file.
destructor
¶
~SCellGrid();
The destructor deletes the array of SCell
objects.
setGeography
¶
void setGeography(Geography* pGeo);
Sets the Geography object.
setClimate
¶
void setClimate(Climate* pClim);
Sets the Climate object.
setVegetation
¶
void setVegetation(Vegetation* pVeg);
Sets the Vegetation* object.
isCartesian
¶
bool isCartesian();
Returns true
if the grid is not icosahedral.