Missing HDF5 mapping for X4 and X8


When CGNS evolved from an ADF backend to an HDF5 backend, mapping of complex number was not done.
Thus it is not possible to read or write complex number with current CGNS/HDF5.

To improve the situation, it would be necessary to implement support in cgio_*_type function.
Memory type for X4 would be a _

struct complex64 { float Real; float Imag};

_ and X8 would be _

struct complex128 { double Real; double Imag};

_. Thus loading data from HDF5 to memory would create an Array of Struct when X4 or X8 is asked. If R4 or R8 is provided for memory type it would means that a 2 dimensional array of R4/R8 is provided (not a struct) to have enough data to represent complex numbers.

The raised issue is then how to map this to HDF5 ?
Should we define a COMPOUND type in hdf5 or do we store one array with twice the number of elements ?

Having support for complex datatype is becoming very important.




Marc Poinot


Mickael PHILIT


Affects versions