Integer¶
Definition¶
1<Item name="obst" caption="Obstacle">
2 <Definition valueType="integer" position="cell">
3 <Enumeration value="0" caption="Normal cell" />
4 <Enumeration value="1" caption="Obstacle" />
5 </Definition>
6</Item>
Display example¶
Example code to read data¶
FORTRAN¶
1integer:: ier, cellcount
2integer, dimension(:), allocatable:: obst
3
4! Read size
5call cg_iRIC_Read_Grid_CellCount(fid, cellcount, ier)
6! Allocate memory
7allocate(roughness(cellcount))
8! Load values into the allocated memory
9call cg_iRIC_Read_Grid_Integer_Cell(fid, "obst", obst, ier)
C/C++¶
1int ier, cellcount;
2std::vector<int> obst;
3
4// Read size
5ier = cg_iRIC_Read_Grid_CellCount(fid, &cellcount);
6// Allocate memory
7obst.assign(cellcout, 0);
8// Load values into the allocated memory
9ier = cg_iRIC_Read_Grid_Integer_Cell(fid, "obst", obst.data());
Python¶
1obst = cg_iRIC_Read_Grid_Integer_Cell(fid, "obst")