Real number

Definition

List 115 Example of a real number type calculation result
1<Output name="depth" caption="Depth">
2  <Definition valueType="real" position="node" />
3</Output>

Example code to output data

FORTRAN

List 116 Code example to output a real number type calculation result defined at nodes FORTRAN
1double precision, dimension(:), allocatable:: depth
2
3! Allocate memory
4allocate(depth(nodecount))
5! Write data to memory
6depth = 0
7! Output data
8call cg_iRIC_Write_Sol_Node_Real(fid, "depth", depth, ier)

C/C++

List 117 Code example to output a real number type calculation result defined at nodes C++
1std::vector<double> depth;
2
3! Allocate memory
4depth.assign(nodecount, 0);
5! Output data
6ier = cg_iRIC_Write_Sol_Node_Real(fid, "depth", depth.data())

Python

List 118 Code example to output a real number type calculation result defined at nodes Python
1import numpy
2
3# Allocate memory
4depth = numpy.zeros(shape=(nodecount,))
5# Output data
6cg_iRIC_Write_Sol_Node_Real(fid, "depth", depth)