Appearance
Features
Feature map
| Topic | Reference | Complete programs |
|---|---|---|
| Image, rectilinear, structured, unstructured grids, polydata, polyhedra | Topologies | cookbook, tutorial 1, 5 |
| Field data, vectors, tensors, active arrays, unsigned and ghost arrays | Data arrays | cookbook, tutorial 3 |
| ASCII, binary, raw, zlib, VTKHDF; UInt64 headers, 64-bit ids | Formats and large data | cookbook, tutorial 2 |
| Parallel headers, multi-block, time series, volatile files | Parallel and composite files | cookbook, tutorial 4, 6, 7 |
| Reading every file back, checking parallel pieces | Reading files | cookbook, tutorial 8 |
| Every procedure and its arguments | Procedures summary, API |
VTK XML Exporters
Serial datasets
| Topology | Extension | Status |
|---|---|---|
| Image Data | .vti | ✅ |
| Polydata | .vtp | ✅ |
| Rectilinear Grid | .vtr | ✅ |
| Structured Grid | .vts | ✅ |
| Unstructured Grid | .vtu | ✅ |
Table (columns of values, VTK vtkTable; a time series through a .pvd; read by VTK and ParaView) | .vtt | ✅ |
| HyperTreeGrid (trees on a root grid, masks, cell data, interface; read by VTK 9.7) | .htg | ✅ |
Parallel (partitioned) datasets
| Topology | Extension | Status |
|---|---|---|
| Parallel Image Data | .pvti | ✅ |
| Parallel Polydata | .pvtp | ✅ |
| Parallel Rectilinear Grid | .pvtr | ✅ |
| Parallel Structured Grid | .pvts | ✅ |
| Parallel Unstructured Grid | .pvtu | ✅ |
| Parallel Table | .pvtt | ✅ |
Composite datasets
| Type | Extension | Status |
|---|---|---|
| vtkMultiBlockDataSet | .vtm | ✅ |
vtkMultiPieceDataSet (a block of pieces in a .vtm) | .vtm | ✅ |
vtkPartitionedDataSetCollection (vtm_file with composite='PartitionedDataSetCollection': blocks, references, the assembly) | .vtpc | ✅ |
vtkPartitionedDataSet (vtm_file with composite='PartitionedDataSet': a flat list of partitions) | .vtpd | ✅ |
vtkOverlappingAMR (levels of .vti boxes; read by VTK 9.7, not ParaView 6.1) | .vthb | ✅ |
| Time series (collection) | .pvd | ✅ |
| ParaView file series (JSON) | .series | ✅ |
VTK XML Importers
Files are read with initialize(filename=..., action='read'), see Reading files: every format (ascii, binary, raw, binary-appended), UInt32 and UInt64 headers, zlib compressed or not, as written by VTKFortran or by VTK and ParaView. Only the array asked for is loaded and decoded.
| Type | Extension | Status |
|---|---|---|
| Serial datasets | .vti, .vtp, .vtr, .vts, .vtu, .vtt, .htg | ✅ |
| Parallel (partitioned) headers, with the check of the pieces | .pvti, .pvtp, .pvtr, .pvts, .pvtu, .pvtt | ✅ |
| Multi-block entries and time series datasets | .vtm, .pvd, .series | ✅ |
| OverlappingAMR entries (levels as blocks, boxes as datasets) | .vthb, .vth | ✅ |
| Partitioned composites (entries; a Partitions of several DataSets as pieces) | .vtpc, .vtpd | ✅ |
BigEndian files are read too (their binary headers and values reversed). Not supported: the LZ4 and LZMA compressors.
VTKHDF Exporters
The VTKHDF format (format='vtkhdf', one HDF5 file, extension .vtkhdf) needs the library built with HDF5 (Installation). Every type below is written and read back (issue #51).
| Type | Status |
|---|---|
| Image Data, one piece: point, cell and field data, active arrays, unsigned arrays, deflate | ✅ |
| Unstructured Grid, each piece a partition: polyhedra, I4P and I8P ids, point, cell and field data, active arrays, deflate | ✅ |
| Polydata, each piece a partition: the four blocks of cells, I4P and I8P ids, point, cell and field data | ✅ |
| Rectilinear and Structured Grids, one piece: coordinates or points, point, cell and field data (read by VTK 9.7, not ParaView 6.1) | ✅ |
Table (columns of values, VTK vtkTable), static or a time series (read by VTK 9.7, not ParaView 6.1: write a .vtt for ParaView) | ✅ |
| OverlappingAMR (levels of uniform boxes, point and cell data), static or a time series (read by VTK 9.7, not ParaView 6.1) | ✅ |
| HyperTreeGrid (trees of branch factor 2 or 3 on a root grid, masks, cell data), static or a time series | ✅ |
Time series in one file (Steps): write_step, valid after every piece, restart with action='append'; a fixed mesh, unchanged geometry or arrays stored once | ✅ |
Multi-block (vtm_file with format='vtkhdf'): the .vtkhdf datasets copied in, the tree of the blocks as Assembly; static, or time series of any type but a Table (VTK 9.7 reads a Table series block without rows) | ✅ |
PartitionedDataSetCollection (vtm_file with composite='PartitionedDataSetCollection'): each dataset copied once, with its Index, referenced from several blocks | ✅ |
Reading VTKHDF files back (action='read'): every topology, Tables, OverlappingAMRs level by level, HyperTreeGrids tree by tree, time series step by step; the entries of a MultiBlockDataSet or PartitionedDataSetCollection (vtm_file) and each of its datasets (dataset=) | ✅ |
One file from MPI ranks (comm, a parallel HDF5): Unstructured Grid and Polydata, one partition per rank, time series too (restart with action='append'), polyhedra, compression; Image Data, Rectilinear and Structured Grids, one region per rank | ✅ |
VTK Legacy Exporters
The legacy (.vtk) format is not supported: VTKFortran writes the VTK XML formats only. Legacy writers were part of the old Lib_VTK_IO (VTKFortran 1.x) and were dropped with the OOP refactoring.
Formats and data
The formats ascii, binary, raw and binary-appended (and raw-zlib), zlib compression of the binary ones, UInt64 headers and 64-bit ids, and vtkhdf: see Formats and large data. Point, cell and field data of every PENF kind (I1P to R8P), ranks 1 to 4, scalars, vectors and tensors, unsigned arrays, active arrays: see Data arrays, and Writing arrays for the shape each array is given in.
Parallel Support
Each vtk_file (writer or reader) keeps its state in its own components. MPI processes write their files at the same time with no limitation. OpenMP threads do too with the library built by ifx or nvfortran (the builds add the flags they need), but not by gfortran, whose static variables for deferred-length string results are shared by the threads (GCC bug 113797): see Threads and processes.
Compiler Support
| Compiler | Status |
|---|---|
| GNU gfortran 12.5, 13.4, 14.3, 16.2 | ✅ Every test passes (the CI uses gfortran 16.2, the serial HDF5 job gfortran 14) |
| GNU gfortran 11.5 | ⚠️ Builds; the two .vtm tests crash |
| Intel ifx 2025.3 | ✅ Every test passes (the discontinued ifort is not tested) |
| NVIDIA nvfortran 26.9 | ✅ Every test passes (built with CMake) |
| NAG, Cray, LLVM Flang | Not tested |
See Installation for how the table is measured.
Design Principles
- Pure Fortran — no system calls beyond standard I/O; the only C libraries are zlib, for compressed data, and HDF5, for VTKHDF, both optional
- OOP — polymorphic
xml_writerallocated at runtime, anxml_readerto read files back;vtk_file,pvtk_file,vtm_file,pvd_fileexpose type-bound procedures - KISS — simple, focused API without unnecessary abstractions
- Error codes — every function returns an integer status, zero on success; only a binary array overflowing its UInt32 header and a zlib failure stop the program, with a message
- Free & Open Source — multi-licensed for FOSS and commercial use