Skip to content

Formats and large data ​

How the data are stored: the VTK XML formats, VTKHDF, zlib compression, arrays and meshes beyond the 32-bit limits. Complete programs: the cookbook and chapter 2 of the tutorial.

Output format selection ​

The format argument to initialize is case-insensitive:

ValueDescription
asciiText inside XML elements
binaryBase64-encoded binary inside XML elements
rawRaw binary in the appended section
binary-appendedBase64-encoded binary in the appended section
raw-zlibShorthand for raw with compressor='zlib', see Compressed binary data
vtkhdfAn HDF5 file in the VTKHDF layout, every topology, HDF5 needed, see VTKHDF

The binary formats (binary, raw, binary-appended) can be zlib-compressed with compressor='zlib', see Compressed binary data. Binary arrays larger than 2 GiB need header_type='UInt64', see Large data arrays.

Where the data are, in the two families of formats:

The structure of a VTK XML file, with its data inline or appendedInline: ascii, binary<VTKFile type="UnstructuredGrid" ...><UnstructuredGrid><Piece NumberOfPoints NumberOfCells><PointData>DataArray Name="pressure"<CellData>DataArray Name="id"<Points>DataArray Name="Points"<Cells>DataArray x 3each DataArray holds its own data:text (ascii) or base64 (binary)Appended: raw, binary-appended<VTKFile type="UnstructuredGrid" ...><UnstructuredGrid><Piece NumberOfPoints NumberOfCells><PointData>DataArray Name="pressure"offset<CellData>DataArray Name="id"offset<Points>DataArray Name="Points"offset<Cells>DataArray x 3offset<AppendedData encoding="raw"> _appended: each array is a bytes count header (UInt32 or UInt64) followed by its bytes;the offset of each DataArray is where its header starts, after the "_"

The appended formats (raw, raw-zlib, binary-appended) write the XML metadata of each array first and its data only at finalize, in the appended section after all the metadata. Until then the data are held in a scratch file, so memory use does not grow with the file size and the arrays can be deallocated after each write_dataarray. The cost is writing the data once more to the scratch file and reading them back. The scratch file is opened in the temporary directory of the Fortran runtime: set TMPDIR (or GFORTRAN_TMPDIR for gfortran, FORT_TMPDIR for Intel ifx) to move it to a disk with enough free space, e.g. off a small /tmp on HPC nodes. The binary format writes inline, with no scratch file.

VTKHDF (HDF5) ​

VTKHDF is the VTK format built on HDF5: one HDF5 file, whose group /VTKHDF holds the dataset as attributes and one HDF5 dataset per array. VTK's vtkHDFReader and ParaView read it; any HDF5 tool (h5py, h5dump, HDFView) reads its arrays directly. It is being added step by step (issue #51): every topology is written now (ImageData, RectilinearGrid, StructuredGrid, UnstructuredGrid with its polyhedra, PolyData), Table (columns of values), OverlappingAMR (block-structured AMR), HyperTreeGrid (tree-based AMR), time series in one file, and one file written by MPI ranks.

Choose it when the files are read by HDF5 tools too, or to use HDF5 compression; stay with the XML formats for files that VTKFortran reads back, and without an HDF5 library. It needs the library built with HDF5 (see Installation): without it initialize returns a non-zero error.

The calls are the ones of the XML formats, with format='vtkhdf'; an ImageData:

f90
error = a_vtk_file%initialize(format='vtkhdf', filename='wave.vtkhdf', mesh_topology='ImageData',     &
                              nx1=0, nx2=nx, ny1=0, ny2=ny, nz1=0, nz2=nz, compressor='zlib',      &
                              origin=[0._R8P, 0._R8P, 0._R8P], spacing=[0.1_R8P, 0.1_R8P, 0.1_R8P])
error = a_vtk_file%xml_writer%write_fielddata(action='open')
error = a_vtk_file%xml_writer%write_fielddata(data_name='time', x=0.5_R8P)
error = a_vtk_file%xml_writer%write_fielddata(action='close')
error = a_vtk_file%xml_writer%write_piece(nx1=0, nx2=nx, ny1=0, ny2=ny, nz1=0, nz2=nz)
error = a_vtk_file%xml_writer%write_dataarray(location='node', action='open', scalars='wave', vectors='velocity')
error = a_vtk_file%xml_writer%write_dataarray(data_name='wave', x=wave, one_component=.true.)
error = a_vtk_file%xml_writer%write_dataarray(data_name='velocity', x=velocity)
error = a_vtk_file%xml_writer%write_dataarray(location='node', action='close')
error = a_vtk_file%xml_writer%write_piece()
error = a_vtk_file%finalize()

The file, as an HDF5 tool lists it (the program reads it back with the HDF5 bindings of the library, vtk_fortran_hdf5):

$ ref_vtkhdf
wave.vtkhdf written; its layout, shapes in C order (as h5dump and h5py show them):
/VTKHDF                    Version     2.6
                           Type        ImageData
                           WholeExtent 0 40 0 30 0 10
                           Spacing     0.1 0.1 0.1
/VTKHDF/PointData/wave     shape [11,31,41]  Attribute Scalars
/VTKHDF/PointData/velocity shape [11,31,41,3]  Attribute Vectors
/VTKHDF/FieldData/time     shape [1]  value 0.50

the wave of the ImageData example with velocity arrows, read by ParaView from the VTKHDF file

  • Layout of an ImageData. /VTKHDF has the attributes Version, Type (ImageData), WholeExtent (the extent passed to initialize), Origin, Spacing and Direction, and the groups PointData, CellData and FieldData, one HDF5 dataset per array, in the order written. The arrays have the type of their kind (R8P a 64-bit float, I4P a 32-bit integer, ...).
  • RectilinearGrid and StructuredGrid (VTKHDF 2.7): Type, and Dimensions, the points along x, y and z (no extent, origin or spacing: the extent of a grid that does not start at 0 is not kept, the coordinates or points carry the geometry). A RectilinearGrid has the datasets XCoordinates, YCoordinates and ZCoordinates (write_geo(x, y, z)), a StructuredGrid the dataset Points of shape [nz+1, ny+1, nx+1, 3] (from any of its write_geo layouts; always 4D, even for a 2D grid, as VTK requires). Arrays as for an ImageData. They need VTK 9.7: ParaView 6.1 (VTK 9.6) reads neither type. A complete program: A grid in a .vtkhdf file.
  • UnstructuredGrid (Type UnstructuredGrid, no extent, origin or spacing): each piece is a partition. Its counts are one entry of NumberOfPoints, NumberOfCells and NumberOfConnectivityIds (64-bit integers), and its Points (shape [np, 3], the kind given to write_geo), Connectivity, Offsets, Types (8-bit unsigned) and point and cell data follow those of the previous pieces in datasets shared by all the pieces. Point ids count from 0 in each piece; Offsets has nc+1 values per piece, from 0 (VTKFortran's offsets, the ends of the cells, are converted). Ids and offsets keep the kind of the call: I4P a 32-bit integer, I8P a 64-bit one. Every piece must write the same point and cell arrays: an array missing from a piece, or new after the first one, is refused. A complete program: Write a .vtkhdf file.
  • Polyhedra (VTKHDF 2.5): the face and faceoffset of write_connectivity become FaceConnectivity (the point ids of each face), FaceOffsets (from 0 in each piece), PolyhedronToFaces (the faces of each polyhedron, from 0 in the piece) and PolyhedronOffsets (one per cell plus one, from 0: a cell that is not a polyhedron has no faces), with the counts NumberOfFaces, NumberOfFaceConnectivityIds and NumberOfPolyhedronToFaceIds of each piece. Once a file has polyhedra every piece has these entries, zeros for a piece without polyhedra. The faces are checked before anything is written: a cell is a polyhedron (type 42) if and only if its faceoffset is not -1, each face has at least 3 points, and the faces of a cell end at its faceoffset. The writer stores each face of each polyhedron, a face shared by two polyhedra twice: valid in every 2.x version. The reader also reads the shared faces of VTKHDF 2.9 (stored once, -(n+1) for the face n traversed in reverse), see Reading.
  • PolyData (Type PolyData): each piece is a partition too, with its entry of NumberOfPoints and its Points. Its cells are in four groups, Vertices, Lines, Strips and Polygons, the blocks of write_polydata_cells: each group has its own NumberOfCells, NumberOfConnectivityIds, Connectivity and Offsets (from 0 in each piece), one entry per piece. A block not given has no cells: its group gets zero entries for the piece (the four groups are always written, VTK reads none without all of them). A piece of points only needs no write_polydata_cells. Each block keeps the kind of its ids (I4P or I8P; I8P when its connectivity and its offsets differ). Cell data follow the order of the blocks, as in the XML formats. A complete program: A PolyData in a .vtkhdf file.
  • Table (mesh_topology='Table', VTKHDF 2.8, a VTK vtkTable): columns of values, no mesh and no pieces. The columns are written between write_dataarray(location='row', action='open') and action='close', each a write_dataarray(data_name, x) of any kind (or write_dataarray_unsigned), with components as a data array: the dataset RowData/<name> of shape [rows, components]. Every column has the same rows (checked), written in NumberOfRows. In a time series each step writes the same columns, its rows appended (NumberOfRows one entry per step, Steps/RowDataOffsets/<name> where each column starts: the spelling VTK writes and reads, the specification page spells it RowDataOffets); the file is valid after each step. Refused: a column with other rows, a column missing in a step or new after the first one, a step without columns, pieces, point and cell data, comm. VTK 9.7 reads it, ParaView 6.1 does not (its VTK 9.6 does not know the type): for ParaView write the same calls in an XML format, a .vtt (one Piece, NumberOfCols, NumberOfRows, the columns in RowData; a series as a .pvd of them). A complete program: A time history (Table).
  • OverlappingAMR (mesh_topology='OverlappingAMR', origin of initialize its origin, a VTK vtkOverlappingAMR): the levels of a block-structured AMR, each of uniform boxes. write_level(level, spacing) starts a level (0, 1, ... in order; a level can be started again, with its spacing), then each box is a piece, write_piece(nx1, nx2, ny1, ny2, nz1, nz2) (its point extent, in the indices of its level) with its point and cell data, closed by write_piece(). The layout (measured on what VTK 9.7.2 reads; its vtkHDFWriter does not write an OverlappingAMR): /VTKHDF with Origin and GridDescription (XYZ), a group Level<n> per level with Spacing, AMRBox (one row per box, its cells nx1, nx2-1, ny1, ny2-1, nz1, nz2-1) and the arrays of its boxes one after the other in PointData and CellData (x fastest in a box, [n] or [n, components]). A box has at least one cell along every axis (VTK reads every box in 3D: a 2D AMR is one cell thick); a box of a finer level lies inside the bounds of the boxes of level 0, which come first; every box of every level writes the same arrays. In a time series every step writes its levels and boxes again (Steps/Level<n>/AMRBoxOffsets, NumberOfAMRBoxes, PointDataOffsets/<name>, CellDataOffsets/<name>, the names of VTKHDF 2.3, with Version 2.3 or more: VTK 9.7.2 chooses the names by Version, the singular ones of 2.2 below 2.3, so both are read back, by VTK and by the library; the library also reads the singular names in a file of a later Version, as VTKFortran wrote a series with an active array before), the file valid after each box. Refused: field data (the specification puts it in each level; VTK 9.7.2 reads none, at the root or in a level: its reader reads point and cell data only), comm, a step without boxes, the XML formats (an XML OverlappingAMR is a .vthb of .vti boxes: vtm_file, see Parallel). Read back level by level (get_levels, set_level), see Reading. VTK 9.7 reads it (its pipeline time too); ParaView 6.1 does not (its reader groups the output with a filter that refuses an OverlappingAMR). A complete program: A block-structured AMR.
  • HyperTreeGrid (mesh_topology='HyperTreeGrid', the extent nx1...nz2 the points of its root grid, branch_factor of initialize 2 (default) or 3, VTKHDF 2.4, a VTK vtkHyperTreeGrid): a tree (quadtree, octree, or their branch-factor-3 kin) in each root cell. One piece, write_piece(nx1, ..., nz2) (the whole extent); its root coordinates write_geo(x, y, z) (as a RectilinearGrid); each tree write_tree(tree_id, descriptor, mask): tree_id its root cell (i + (nx-1)(j + (ny-1)k), from 0), descriptor the refinement (true) of its cells breadth first, the children of a cell x fastest, every depth but the deepest (whose cells are all leaves; an empty descriptor is one leaf), mask (optional) one value per cell, a refined cell not masked; then its cell data, one value per cell of the trees, in the order of the trees written and breadth first in each; write_piece(). The layout, as VTK 9.7.2 writes it: Dimensions, BranchFactor, XCoordinates..., Descriptors and Mask (bits packed MSB first, contiguous across the trees), DescriptorsSize (bits), TreeIds, DepthPerTree, NumberOfCellsPerTreeDepth, NumberOfTrees, NumberOfDepths, NumberOfCells, CellData. Checked: each descriptor against its depths, the mask, the tree ids (in the root grid, once), the size of the cell data. A time series (write_step): every step writes its piece (its coordinates, trees and cell data) appended to those of the steps before, each step's bits from a new byte, the mask always, with the Steps entries VTK 9.7.2 writes (TreeIdsOffsets, DepthPerTreeOffsets, NumberOfCellsPerTreeDepthOffsets, DescriptorsOffsets, MaskOffsets, X/Y/ZCoordinatesOffsets, PartOffsets, NumberOfParts, CellDataOffsets/<name>); VTK 9.7.2 reads each step (its pipeline time too). xml_writer%set_interface(normals, intercepts) names its interface arrays, cell arrays of 3 components (root attributes InterfaceNormalsName and InterfaceInterceptsName, as VTK writes them; VTK 9.7.2 reads them as the interface of the grid, GetHasInterface), at any time while the file is open. Refused: point data, field data, a step without its piece, comm, action='append' (the XML formats write it as a .htg, see Topologies). The reader of the library reads it back tree by tree (get_trees, read_tree: Reading). VTK 9.7.2 reads it; ParaView 6.1.1 reads it too, but not the test's grid with a masked leaf and a root cell without tree (nor the same grid as VTK 9.7.2 writes it). A complete program: A tree-based AMR.
  • Time series (Steps): each output starts with xml_writer%write_step(time); the pieces of every step are appended to the same datasets, a grid's arrays get a time axis ([t, k, j, i] in C order), and the group Steps holds the times and, for each step, where it starts in the datasets (PartOffsets, PointOffsets, ..., PointDataOffsets/<name> and CellDataOffsets/<name> for every array, in tuples, in time slices for a grid). What a step does not write (the mesh, in a step without pieces; the geometry of a grid; an array) is stored once, the step repeating the offsets of the step before. The file is valid after every piece; action='append' continues it (a refused one, e.g. of a file that is not a time series, leaves the file as it was). See One VTKHDF file instead of a collection, whose diagram shows the layout.
  • From MPI ranks (initialize(..., comm=), the library built with VTKFORTRAN_USE_MPI and a parallel HDF5): the ranks of the communicator write one UnstructuredGrid or PolyData file, the piece of each rank a partition, in rank order. The file is the one the pieces would make written by one process, but for the kind of the ids: a dataset gets the widest kind the ranks give (a PolyData block a rank does not have is 64-bit, so its ids are 64-bit unless every rank gives every block in I4P). An ImageData, RectilinearGrid or StructuredGrid is written by regions: each rank gives its sub-extent to write_piece and the arrays (and coordinates or points) of that region; the datasets are created with the whole extent and each rank writes its block, the points of a boundary shared with the next region left to that region, the coordinates of a RectilinearGrid shared by regions written by the lowest rank (they must be equal). The regions must lie inside the whole extent, not overlap in cells and cover it (checked when they start, on every rank); an empty region (an upper bound before its lower one) writes nothing. The file is the one the whole grid written by one process makes. Every call is collective (same calls, same arrays, same order on every rank); the writes of the ranks are independent (MPI-IO). A time series of an UnstructuredGrid or a PolyData too: every rank calls write_step with the same time and writes its piece of each step (or, in a step without pieces, the arrays of its part of the mesh reused); the Steps entries are the totals of the ranks, written once; action='append' with comm continues it. Polyhedra too, on any ranks (the others write zero entries), and compression (compressor='zlib', an HDF5 1.10.2 or later with the deflate filter: the writes are then collective). A time series of a grid too: each step a region per rank (checked at every step), every dataset one time slice more, each rank its block of it; a parallel restart continues it (the first step after it writes its regions: they are not in the file; a RectilinearGrid or StructuredGrid takes the start of its extent from them). Refused with comm: compression of a grid. Complete programs: Write one .vtkhdf from MPI ranks.
  • No transposition. An array is stored as it is in memory (an ImageData, RectilinearGrid or StructuredGrid): a Fortran velocity(3,0:nx,0:ny,0:nz) is the dataset of shape [nz+1, ny+1, nx+1, 3] in C order (the order HDF5 tools show), which is the shape VTKHDF wants. Point data have the shape of the grid points, cell data of the cells; the components of a vector are the last dimension (C order). The axes of one point (a 2D or 1D grid) are dropped, as VTK writes them: a nx+1 by ny+1 grid has arrays of shape [ny+1, nx+1].
  • ImageData, RectilinearGrid, StructuredGrid: one piece, whose extent is the whole extent: write_piece is called once, with the extents of initialize; the piece of a RectilinearGrid or StructuredGrid needs its write_geo.
  • Data arrays: every kind, rank and layout of write_dataarray, and write_dataarray_unsigned (HDF5 unsigned types). An array whose size does not match the grid or the piece is refused. Active arrays (scalars=, vectors=, ..., global_ids=, ..., process_ids=: every role of VTK) become the Attribute attribute of their dataset; field data strings are variable-length string datasets (as vtkHDFWriter writes them; refused with comm), string point, cell or row data are refused (VTK 9.7.2 reads strings as field data only). See Data arrays.
  • Compression: compressor='zlib' deflates every dataset (level 6, by chunks). It needs the deflate filter of the HDF5 library, not VTKFORTRAN_USE_ZLIB: without it initialize returns a non-zero error.
  • Chunks: the datasets that grow (the partitions of an UnstructuredGrid or a PolyData, every dataset of a time series) or are deflated are stored by chunks of whole rows (the last dimension of the values: points, cells, time slices of a grid): as many as fit in initialize(..., chunk_bytes=) (default 1 MiB), at least one, at most the rows of the first write (of all the ranks with comm). Larger chunks mean fewer HDF5 metadata operations (large parallel runs, a chunk aligned to the stripe of a parallel file system), smaller ones less unused space in short series. A dataset created empty (the faces of polyhedra first appearing at a later step) has chunks of one row. Refused: a value that is not positive, an XML format, action='read', different values on the ranks of comm; with action='append' it applies to the datasets created from then on, the others keep their chunks. The other datasets are contiguous.
  • Version: the lowest one with the features written: 2.0, 2.5 with polyhedra, 2.6 when an active array is designated, 2.7 for a RectilinearGrid or StructuredGrid, 2.8 for a Table, 2.2 for an OverlappingAMR time series, 2.4 for a HyperTreeGrid. The files are checked with VTK 9.7.2 and ParaView 6.1.1 (but the RectilinearGrid, StructuredGrid, Table and OverlappingAMR files, which ParaView 6.1 cannot read).
  • Not supported: more than one piece of a grid (ImageData, RectilinearGrid, StructuredGrid), a volatile file (is_volatile), VTKHDF pieces in parallel (P*) and .pvd files (a multi-block file is vtm_file with format='vtkhdf', a MultiBlockDataSet or a PartitionedDataSetCollection, static or a time series of UnstructuredGrid and PolyData blocks, see Multi-block in one VTKHDF file; a VTKHDF file is read back with action='read', see Reading). Names: a data name (point, cell, field data) or a block name of a multi-block file empty or containing / or . is refused, never renamed (VTKHDF names are HDF5 link names; the XML formats accept them). Each refusal is a non-zero error with a message on standard error. header_type is ignored: HDF5 has no size limit per array.

Compressed binary data (zlib) ​

The binary formats can compress their data with zlib, as VTK and ParaView do (vtkZLibDataCompressor). Select the compressor when initializing the file:

f90
error = a_vtk_file%initialize(format='binary', filename='ref_zlib.vtu', mesh_topology='UnstructuredGrid', compressor='zlib')
formatwith compressor='zlib'
binarycompressed data, base64-encoded inside each DataArray
rawcompressed data, raw in the appended section (the same as format='raw-zlib')
binary-appendedcompressed data, base64-encoded in the appended section
asciithe compressor is ignored: ASCII data are never compressed
  • compressor is 'none' (default) or 'zlib', case insensitive. Any other value makes initialize return a non-zero error, and so does format='raw-zlib' with compressor='none'.
  • zlib must be enabled when the library is built (VTKFORTRAN_USE_ZLIB, see Installation). Without it, compressor='zlib' and raw-zlib make initialize return a non-zero error: check it to fall back to an uncompressed format.
  • The compression applies to every DataArray of the file: points, connectivity, point, cell and field data. The file declares compressor="vtkZLibDataCompressor" in its VTKFile element. Parallel (P*), multi-block and .pvd files contain no binary data: each piece selects its own compressor.
  • Each array is split into blocks of 32 KiB, each compressed independently (zlib level 6), and is preceded by a header with the number of blocks, the block size, the size of the last partial block and the compressed size of each block. The header words are UInt32 or UInt64, as the header_type of the file. With base64, VTK encodes the header and the compressed blocks as two separate base64 streams, and so does VTKFortran: the encoded arrays are byte-identical to the output of VTK's own writer with the same compression level. The level is fixed at 6 (VTK's writer defaults to 5 and lets it be set): readers do not depend on it, and a per-file level would have to reach every encoder (a library-wide setting would not be safe for files written by concurrent threads).
  • How much the files shrink depends on the data: integer arrays (connectivity, offsets, cell types, ids) and fields with repeated values compress well, generic floating point fields much less. Measure on your own data.
  • The cost is CPU time, and memory: while an array is written, its bytes are copied and compressed into temporary buffers that together take up to about twice the size of the array.
  • With header_type='UInt32', the 2 GiB limit applies to the uncompressed size of each array, as without compression.

Large data arrays (UInt64 headers) ​

In the binary formats (binary, raw, raw-zlib, binary-appended) each DataArray is prefixed by its size in bytes (by the header of its compressed blocks, when compressed). By default the prefix is a 32-bit integer (header_type="UInt32"), which limits each DataArray to 2 GiB: for example a 3-component R8P field of more than about 89 million points. A larger array stops the execution with an explicit error that suggests the fix. Select 64-bit prefixes when initializing the file:

f90
error = a_vtk_file%initialize(format='raw', filename='ref_uint64.vtu', mesh_topology='UnstructuredGrid', header_type='UInt64')
  • header_type is 'UInt32' (default) or 'UInt64', case insensitive; any other value makes initialize return a non-zero error. It applies to the whole file, so choose it before writing any array; the ASCII format ignores it.
  • With 'UInt64' the file declares header_type="UInt64" and the size prefixes (and, for compressed data, the compressed blocks headers) are 8 bytes wide, as written by VTK itself; ParaView and VTK read these files.
  • The default keeps the files exactly as before. Parallel (P*) and multi-block files contain no binary data: their pieces select their own header type.
  • The number of elements of an array is not limited to 32 bits: an array can hold more than 2^31 values (e.g. the connectivity of more than about 270 million hexahedra) in every format, provided its bytes fit the header type.
  • The limit concerns the bytes of a single array; for pieces with more than 2^31-1 points or cells, see Large meshes.

Large meshes (64-bit counts and connectivity) ​

A piece with more than 2^31-1 points or cells, or whose point ids exceed huge(1_I4P), needs 64-bit counts and ids. The mesh procedures accept I8P arguments: the kind passed selects the version, so existing I4P calls are unchanged.

f90
integer(I8P) :: np, nc, connect(4), offset(1)   ! allocatable in a real code
f90
error = a_vtk_file%xml_writer%write_piece(np=np, nc=nc)
error = a_vtk_file%xml_writer%write_geo(np=np, nc=nc, x=x, y=y, z=z)
error = a_vtk_file%xml_writer%write_connectivity(nc=nc, connectivity=connect, offset=offset, cell_type=cell_type)
Procedure64-bit version
write_piece(np, nc)np, nc as I8P
write_piece(np, nverts, nlines, nstrips, npolys)all counts as I8P
write_geo(np, nc, x, y, z), write_geo(np, nc, xyz)np, nc as I8P
write_connectivity(nc, connectivity, offset, cell_type, face, faceoffset)nc, ids, offsets and faces as I8P; cell_type stays I1P
write_polydata_cells(...)the arrays of each block as I8P (each block can use I4P or I8P)
  • I8P connectivity, offsets and faces are written as Int64, as VTK's own writer does; I4P ones as Int32. Readers accept both, and the mesh is the same.
  • Counts and ids can be mixed: e.g. I4P counts in write_piece with I8P connectivity.
  • An array with more than 2^31 elements works in either kind (e.g. an I4P connectivity of more than about 270 million hexahedra); its bytes must fit the header type (header_type='UInt64' beyond 2 GiB).
  • The extents of structured grids (RectilinearGrid, StructuredGrid, ImageData) stay 32-bit per axis.
  • The test src/tests/vtk_fortran_write_i8p.f90 writes the same meshes with both kinds, in every format.