I am developing vtkhdf export module for FE solver. I have a problem in reading the data for the last step (in Paraview 5.12.0-RC2). I guess that Paraview uses vtkHDFReader, so I ask for help here. The dump of sample hdf file demonstrating the problem:
HDF5 "se.out.m0.hdf" {
GROUP "/" {
GROUP "VTKHDF" {
ATTRIBUTE "Type" {
DATATYPE H5T_STRING {
STRSIZE 16;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
}
DATASPACE SCALAR
DATA {
(0): "UnstructuredGrid"
}
}
ATTRIBUTE "Version" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 2 ) / ( 2 ) }
DATA {
(0): 1, 0
}
}
GROUP "CellData" {
}
DATASET "Connectivity" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 24 ) / ( H5S_UNLIMITED ) }
DATA {
(0): 0, 2, 3, 1, 2, 4, 5, 3, 0, 2, 3, 1, 2, 4, 5, 3, 0, 2, 3, 1, 2,
(21): 4, 5, 3
}
}
DATASET "NumberOfCells" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 3 ) / ( H5S_UNLIMITED ) }
DATA {
(0): 2, 2, 2
}
}
DATASET "NumberOfConnectivityIds" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 3 ) / ( H5S_UNLIMITED ) }
DATA {
(0): 8, 8, 8
}
}
DATASET "NumberOfPoints" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 3 ) / ( H5S_UNLIMITED ) }
DATA {
(0): 6, 6, 6
}
}
DATASET "Offsets" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 9 ) / ( H5S_UNLIMITED ) }
DATA {
(0): 0, 4, 8, 0, 4, 8, 0, 4, 8
}
}
GROUP "PointData" {
DATASET "DisplacementVector" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 18, 3 ) / ( H5S_UNLIMITED, 3 ) }
DATA {
(0,0): 0, 0, 0,
(1,0): 0, 0, 0,
(2,0): 0.012391, 0.00160247, 0,
(3,0): 0.012391, -0.00160247, 0,
(4,0): 0.025, 0.00109012, 0,
(5,0): 0.025, -0.00109012, 0,
(6,0): 0, 0, 0,
(7,0): 0, 0, 0,
(8,0): 0.024782, 0.00320494, 0,
(9,0): 0.024782, -0.00320494, 0,
(10,0): 0.05, 0.00218023, 0,
(11,0): 0.05, -0.00218023, 0,
(12,0): 0, 0, 0,
(13,0): 0, 0, 0,
(14,0): 0.037173, 0.00480741, 0,
(15,0): 0.037173, -0.00480741, 0,
(16,0): 0.075, 0.00327035, 0,
(17,0): 0.075, -0.00327035, 0
}
}
}
DATASET "Points" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 18, 3 ) / ( H5S_UNLIMITED, 3 ) }
DATA {
(0,0): 0, 0, 0,
(1,0): 0, 1, 0,
(2,0): 1, 0, 0,
(3,0): 1, 1, 0,
(4,0): 2, 0, 0,
(5,0): 2, 1, 0,
(6,0): 0, 0, 0,
(7,0): 0, 1, 0,
(8,0): 1, 0, 0,
(9,0): 1, 1, 0,
(10,0): 2, 0, 0,
(11,0): 2, 1, 0,
(12,0): 0, 0, 0,
(13,0): 0, 1, 0,
(14,0): 1, 0, 0,
(15,0): 1, 1, 0,
(16,0): 2, 0, 0,
(17,0): 2, 1, 0
}
}
GROUP "Steps" {
ATTRIBUTE "NSteps" {
DATATYPE H5T_STD_I32LE
DATASPACE SCALAR
DATA {
(0): 3
}
}
DATASET "CellOffsets" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 3, 1 ) / ( H5S_UNLIMITED, 1 ) }
DATA {
(0,0): 0,
(1,0): 3,
(2,0): 6
}
}
DATASET "ConnectivityIdOffsets" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 3, 1 ) / ( H5S_UNLIMITED, 1 ) }
DATA {
(0,0): 0,
(1,0): 8,
(2,0): 16
}
}
DATASET "NumberOfParts" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 3 ) / ( H5S_UNLIMITED ) }
DATA {
(0): 1, 1, 1
}
}
DATASET "PartOffsets" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 3 ) / ( H5S_UNLIMITED ) }
DATA {
(0): 0, 0, 0
}
}
DATASET "PointOffsets" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 3 ) / ( H5S_UNLIMITED ) }
DATA {
(0): 0, 6, 12
}
}
DATASET "Values" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 3 ) / ( H5S_UNLIMITED ) }
DATA {
(0): 1, 2, 3
}
}
}
DATASET "Types" {
DATATYPE H5T_STD_U8LE
DATASPACE SIMPLE { ( 6 ) / ( H5S_UNLIMITED ) }
DATA {
(0): 9, 9, 9, 9, 9, 9
}
}
}
}
}
I got following error:
ERROR: In vtkHDFReaderImplementation.cxx, line 1025
vtkHDFReader (00000169353D4DA0): Error H5Dread start: 6, 9801279100561222763, 1552024982320 count: 2, 9801295593230199896, 0
ERROR: In vtkHDFReader.cxx, line 160
(nullptr): Cannot read the Types_0 array from file
ERROR: In vtkHDFReader.cxx, line 856
vtkHDFReader (00000169353D4DA0): Cannot read the Types array
Clearly, the problem is with types dataset, but in my opinion it contains data for 2 cell types for 3 time steps = 6 entries.
Any help very much appreciated. Borek