vtkHDF: add support for polyhedron
The idea would be to add support for polyhedral cell in a partition of unstructured grid stored in vtkHDF
The partition sizing for polyhedral cells would required defining the following variables:
- NumberOfPolygonalFaces
- NumberOfPolygonConnectivityIds
- NumberOfPolyhedronToFaceIds
We can then compute the size of partition i using the following formulas:
Size of partition i | |
---|---|
Points | NumberOfPoints[i] * 3 * sizeof(Points[0][0]) |
Connectivity | NumberOfConnectivityIds[i] * sizeof(Connectivity[0]) |
Offsets | (NumberOfCells[i] + 1) * sizeof(Offsets[0]) |
Types | NumberOfCells[i] * sizeof(Types[i]) |
PolygonConnectivity | NumberOfPolygonConnectivityIds[i] * sizeof(PolygonConnectivity[i]) |
PolygonOffsets | (NumberOfPolygonalFaces[i] + 1) * sizeof(PolygonOffsets[i]) |
PolyhedronToFaces | NumberOfPolyhedronToFaceIds[i] * sizeof(PolyhedronToFace[0]) |
PolyhedronOffsets | (NumberOfCells[i] + 1) * sizeof(PolyhedronOffsets[0]) |
PointData | NumberOfPoints[i] * sizeof(point_array_k[0]) |
CellData | NumberOfCells[i] * sizeof(cell_array_k[0]) |
The issue is that PolyhedronToFaces and PolyhedronFaces can easily be splitted in partition but it is less obvious for the PolygonOffsets (or FaceOffsets) and PolygonConnectivity (or FaceConnectivity).