Real number

Definition

List 103 Example of a real number type grid attribute
1<Item name="roughness" caption="Roughness">
2  <Definition valueType="real" position="cell" />
3</Item>

Display example

../_images/grid_att_example_real_object_browser.png

Figure 63 Example of real number type grid attribute defined at cells

../_images/grid_att_example_real_edit_dialog.png

Figure 64 Dialog to edit value of real number type grid attribute defined at cells

Example code to read data

FORTRAN

List 104 Code example to load a real number type grid attribute defined at cells FORTRAN
1integer:: ier, cellcount
2double precision, dimension(:), allocatable:: roughness
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_Real_Cell(fid, "roughness", roughness, ier)

C/C++

List 105 Code example to load a real number type grid attribute defined at cells C++
1int ier, cellcount;
2std::vector<double> roughness;
3
4// Read size
5ier = cg_iRIC_Read_Grid_CellCount(fid, &cellcount);
6// Allocate memory
7roughness.assign(cellcout, 0);
8// Load values into the allocated memory
9ier = cg_iRIC_Read_Grid_Real_Cell(fid, "roughness", roughness.data());

Python

List 106 Code example to load a real number type grid attribute defined at cells Python
1roughness = cg_iRIC_Read_Grid_Real_Cell(fid, "roughness")