Changelog#

Notable changes to this project are documented below.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.


Unreleased#


0.4.3#

Patch release fixing the PLT reader for cell-centered data in lower-dimensional ordered zones and adding a new console script.

Added#

  • tectable console script converts a delimited text table to Tecplot zones with additional flags for filtering or grouping like data into zones.

Fixed#

  • The PLT reader sized cell-centered variables of ordered zones as I*J*(K-1) values for every zone. TecIO pads every dimension except the last one with more than one node. So the PLT reader did not correctly calculate the number of values to read for cell-centered data in one or two dimension while in three dimensions the correct number of values were read. This bug did not affect SZL or DAT readers.

Full changelog: v0.4.2…v0.4.3


0.4.2#

Added FEMIXED support and unstructured data utilities.

Added#

  • Node-map utilities for classic finite-element zones, importable from tecio:

    • classify_cells, shape_counts and degenerate_edges detect cells written as FEBRICK or FEQUADRILATERAL with repeated node indices (tetrahedra, pyramids, prisms, triangles).

    • collapsed_zone_type and collapse_cells collapse such cells to their natural zone type (FEBRICK to FETETRAHEDRON, FEQUADRILATERAL to FETRIANGLE) and keep the cell handedness. expand_cells goes the other way.

    • split_cells_by_shape separates padded cells in a FEBRICK or FEQUADRILATERAL zone by shape for writing them as a FEMIXED zone. Pyramids and prisms keep the handedness of the brick they came from.

    • cell_face_neighbors finds the cell across every face of every cell from the node map alone, for triangles, quadrilaterals, tetrahedra and bricks. It returns -1 for boundary faces.

    • match_nodes and match_cells find how the nodes and cells of a zone are ordered relative to a reference zone with the same grid since multiple cell orderings could be used for identical unstructured meshes. They return the orders that put nodal and cell-centered variables in the reference order, or None if the zones do not match.

  • TecplotPolyZoneReader.element_faces() and element_nodes() return the faces and the distinct nodes of every element of a polygon or polyhedron zone as (offsets, flat_array), built from the face left and right elements.

  • tecelretyp console script retypes FE zones whose cells are all upcast with repeated nodes, which gives a more compact node map and more descriptive zone metadata.

  • FEMIXED (mixed finite-element) zones suppport (read and write) for SZPLT files.

Changed#

  • tecmerge --merge-grid now compares the grid variables and, for classic FE zones, the connectivity of zones before sharing. A zone with the same grid stored in another node and cell order (e.g. the same mesh in PLT and SZL) shares the grid and has its nodal and cell-centered variables reordered to match. Zones not matching the connectivity in any order retain their grid.

Full changelog: v0.4.1…v0.4.2


0.4.1#

Polyhedral an polygon zones are now supported.

Added#

  • Polygon and polyhedron zones (FEPOLYGON and FEPOLYHEDRON) can be read and written in PLT and DAT files. They are returned as the new TecplotPolyZoneReader, a zone class separate from the ordered and FE classes, with 0-based face_nodes, face_node_counts, face_left_elements, face_right_elements and boundary connection arrays, returned as stored on disk. New write_poly_zone writer method (BLOCK packing only; SZPLT raises NotImplementedError). Connectivity sharing and append mode work with poly zones. Every CLI tool that rewrites a file (teconvert, tecextract, tecfix, tecscale, tecaux, tecmerge and tecslice) now carries poly zones through, and exits with an error when asked to write them to SZPLT. tecmerge --merge-grid writes an identical poly grid once and shares it across zones (for example transient steps), matching on a hash of the full face map. tecdump reports poly counts and tec2mat exports a 1-based face map. Legacy PLT v111 poly zones are readable.

Fixed#

  • tecslice -t now writes “anchor” zones for dropped sources to keep the variables that are shared from them and every shared zone is renumbered.

  • tecextract and tecmerge now remap zones for poly boundary connections.

  • tecmerge --merge-grid no longer drops a zone whose only variables are grid variables to preserve boundary connections.

  • tecpolybconn142 wrapper argument types (boundary connection zones are INT32 values).

  • PLT v111 zone header: the extra INT32 follows the zone type.

Full changelog: v0.4.0…v0.4.1


0.4.0#

Python API is now 0-indexed throughout, and TecplotPltReader can read legacy PLT binary files.

Added#

  • Read-only support for legacy PLT binary versions v75, v107, and v111 in TecplotPltReader (and so tecio.open()). The version is detected from the file’s magic string, and the same reader interface is returned for every version. Older versions carry less information, so some properties are empty: v75 has no variable sharing, passive variables, face connections, strand ID or solution time, cell-centered data, or auxiliary data. v75 pyramids and prisms are stored as bricks with repeated nodes and are returned as read. Writers still produce the current format only, and tecio.open() raises ValueError for 'a' and 'a+' on a legacy file. See the new “Legacy PLT Versions” documentation page for a version-by-version comparison.

  • .bbin and .bbin8 file extensions are now recognized as Tecplot PLT binary files.

  • tecscale can now transform multiple variables in a single call.

  • New --strand-offset flag for tecmerge to allow multiple transient data files to be loaded without automerging overlapping strand IDs (e.g. create strand IDs 101, 102, 103, …).

  • First version of a Tecplot data writer plugin for Paraview, TecplotTecioWriter.py.

  • MATLAB function tecmat2struct to reformat the zone structures created by tec2mat into a struct array of zones with arrays accessible by variable name.

Changed#

  • Breaking: the entire Python API is now 0-indexed. Every zone or variable index accepted or reported by any Python function, class, or method (container indexing, zone_index, var_index, get_array, get_zone_auxdata, get_var_auxdata, shared zone and connectivity indices, and so on) is 0-based. The tecio.libtecio C wrapper functions keep Tecplot’s 1-based convention, and the reader and writer classes convert automatically. Existing code that passes or compares indices needs to be updated, and an index that is off by one often raises no error.

  • Passive and shared variables are now specified in the writer methods by naming only those variables. Previously a flag was required for every variable in the dataset, while data arrays and value locations were only given for the active ones. Use passive_vars=["x", "y", "z"] and var_sharing={"x": 1, "y": 1, "z": 1} (variable name or index mapped to the shared zone index).

Full changelog: v0.3.3…v0.4.0


0.3.3#

Added#

  • Added option to automatically share grid when merging with tecmerge.

  • Added package level functions to query Tecplot files for zone list, variable list, etc. without fully paring the file (quick and low memory).

  • 3rd party plugins using tecio are now automatically added to the install share folder when installed with pip.

Full changelog: v0.3.2…v0.3.3


0.3.2#

Changed#

  • Added face neightbor support for PLT and DAT file formats. Hooks are in place for SZL format, but current version of TecIO library has a bug that does not read or write face neighbors correctly.

  • Breaking: TecplotWriter.write_ijk_zone renamed to write_ordered_zone, for symmetry with write_fe_zone.

  • Breaking: Reader container properties renamed for clarity: .zone → .zones and .variable → .variables, on every reader and zone reader class.

  • Variable names are now supported as an additional input option for CLI tools wherever previously only variable index was accepted.

  • Breaking: CLI tool flags are updated for better consistency between tools. Use -h to see the available flags for each tool.

  • pragma: no cover added wherever there is environment dependent or non-converable code execution so coverage report is more accurate.

Fixed#

  • The number of values in ordered zones without point counts are now inferred instead of defaulting to one.

Full changelog: v0.3.1…v0.3.2


0.3.1#

Robustness improvementes.

Changed#

  • Enums (ZoneType, DataType, FileType, ValueLocation, DataPacking, FileFormat, FeCellShape, FaceNeighborMode, VarStatus, Boolean, Debug) now live in tecio._constants and are importable directly from the top-level tecio package (tecio.ZoneType, not just tecio.libtecio.ZoneType), matching every other public class. Still re-exported from tecio.libtecio for backward compatibility.

  • tecio.libtecio’s C-library load/bind mechanism is now implemented as reusable, stateless functions in tecio._utils (load_library, bind, requires_symbol); libtecio.py itself is reduced to the C function wrappers and their own state (lib, LIBRARY_LOAD_ERROR, LIBRARY_PATH, UNAVAILABLE_FUNCTIONS). No behavior change; importing tecio.libtecio still never raises, even with no Tecplot installation or an older one missing a newer symbol.

  • bind is now keyword-only at its call sites for readability.

Fixed#

  • TecplotPltWriter.close() and TecplotDatWriter.close() now flush buffered auxiliary data, matching TecplotSzlWriter’s existing behavior. Previously, calling add_auxdataset_dict()/add_auxvar_dict() after the first zone had already been written silently discarded that data on PLT and DAT output, no error, nothing written.

Full changelog: v0.3.0…v0.3.1


0.3.0#

Major internal reorganization: reader and writer classes now share a common, enforced interface across all three formats, and zone readers are split by topology. tecio.szl, tecio.plt, and tecio.dat no longer exist as public submodules.

Added#

  • TecplotReader / TecplotWriter — shared abstract base classes defining the interface every format’s reader/writer implements. A subclass cannot be instantiated unless it implements every required property and method, so the three formats can no longer drift out of sync with each other.

  • TecplotZoneReader — shared zone interface (title, zone_type, solution_time, strand_id, variable, auxdata, get_array(), …), split into two concrete shapes by topology:

    • TecplotOrderedZoneReader — adds I, J, K, dimensions.

    • TecplotFEZoneReader — adds node_map, nodes_per_cell, shared_connectivity, and num_nodes/num_elements.

  • TecplotVariableReader, TecplotAuxDataReader — shared variable and auxiliary-data interfaces, identical for every format. Not split by value location or zone topology: nodal vs. cell-centered and dataset- vs. zone-level data only change what one method returns, never which properties exist.

  • TecplotSzlReader, TecplotPltReader, TecplotDatReader, TecplotSzlWriter, TecplotPltWriter, TecplotDatWriter — concrete, per-format classes, imported directly from tecio. tecio.open() returns one of these; construct one directly to bypass extension-based dispatch.

  • Zone, variable, and auxiliary-data reader objects are now immutable, assigning to any attribute raises AttributeError.

  • zone_index is now part of the shared TecplotZoneReader interface on every format (previously present on some formats’ zone objects but not guaranteed on all three).

Changed#

  • Breaking: a zone’s topology-specific properties now only exist on the matching subclass. zone.node_map / .shared_connectivity / .nodes_per_cell raise AttributeError on an ordered zone (previously returned None); zone.I / .J / .K / .dimensions raise AttributeError on an FE zone (previously unused placeholder values on some formats). Use isinstance(zone, TecplotOrderedZoneReader) / isinstance(zone, TecplotFEZoneReader) to branch on topology.

  • CLI tools (tecdump, tecextract, tecfix, tecscale, teconvert, tec2mat, tecaux, tecmerge, tecslice) updated to use the new classes internally; command-line interfaces are unchanged.

Fixed#

  • Auxiliary data added with add_auxdataset_dict() / add_auxvar_dict() after a writer was opened with an explicit variables list (rather than left to open lazily on the first zone write) was silently never written to the file, on all three formats. Auxiliary data is now always flushed before the first zone regardless of how the writer was opened.

  • A zone type whose connectivity a format cannot resolve (currently PLT’s FEPOLYGON/FEPOLYHEDRON) re-read node_map from disk on every access instead of caching the None result.

Removed#

  • Breaking: tecio.szl, tecio.plt, and tecio.dat submodules. szl.Read, szl.Write, plt.Read, plt.Write, dat.Read, dat.Write no longer exist. Use TecplotSzlReader / TecplotSzlWriter, etc., imported directly from tecio:

    # Before
    from tecio.szl import Read
    
    r = Read("flow.szplt")
    
    # After
    from tecio import TecplotSzlReader
    
    r = TecplotSzlReader("flow.szplt")
    

    tecio.open() is unaffected and remains the recommended entry point for most use cases.

Full changelog: v0.2.4…v0.3.0


0.2.4#

Performance upgrade.

Added#

  • Higher performance ascii file read using numpy from file. Way faster for well-formatted files where data chunk sizes can be estimated from reading the first 1-2 lines.

Full changelog: v0.2.3…v0.2.4


0.2.3#

Bug fixes and added utilities.

Added#

  • Paraview plugin to read in all Tecplot file types

    • Fixes errors in packaged ParaView Tecplot for zone header fields SOLUTIONTIME and STRANDID.

    • Provdes .szplt file format reading capability in ParaView.

    • Automatically converts aux data to vtkFieldData.

Fixed#

  • dat.Read did not have zone_index or var_index properties. Fixed to match szl and plt modules.

Full changelog: v0.2.2…v0.2.3


0.2.2#

Minor CLI tool changes and bug fixes

Added#

  • Options to export or strip aux data items in tecaux.

Fixed#

  • Zone copy methods for appdend mode previously did not copy shared connectivity information.

  • Inconsistent formatting of docstrings


0.2.1#

New command line tool and performance upgrade option for SZL writer when writing large datasets.

Added#

  • tecaux - command line tool to add aux data to Tecplot files.

  • flush option added to SZL zone writers to flush data to temporary files and release memory.


0.2.0#

Consistent variable/connectivity sharing across all three writers and readers, a unified precision option, and per-variable typing for ASCII output.

Added#

  • precision keyword argument on all writer classes for controlling floating-point storage precision (DataType.FLOAT/DataType.DOUBLE, or "single"/"double" strings). Applies only to floating-point variables, integers are always preserved exactly.

    • SZL defaults to None (fully automatic, per-variable, unchanged from before).e

    • PLT defaults to DataType.DOUBLE and applies to every variable, including integers — the classic API has no per-variable or integer specification capability.

    • DAT defaults to DataType.FLOAT (single) and now reads and writes real per-variable data types via the DT= zone header keyword.

  • ReadZone.shared_connectivity — 1-based source zone index if a zone’s FE connectivity is shared, else None.

  • Internal WriterMeta/ZoneMeta tracking (Write.meta) on all three writers: each zone records what was actually written so later zones validate var_sharing/con_sharing against the source zone arrays.

Changed#

  • Shared variables and shared FE connectivity now resolve to the source zone’s actual data automatically on read, on all three formats — variable.values and zone.node_map forward data arrays from the source zone (previously returned None). Use variable.shared_zone / zone.shared_connectivity to check whether something is shared.

Fixed#

  • FE zone writers raised IndexError when node_map was omitted for a zone sharing connectivity via con_sharing.

  • Shared-variable shape/count validation could miss real mismatches when the locally-supplied array was internally self-consistent but disagreed with the actual shared source’s recorded dimensions.

  • DAT: reader parsed every value as float64 regardless of declared type; now defaults to SINGLE (not DOUBLE) when DT= is absent, matching the documented format default.

  • CLI tools previously did not follow shared zone and connectivty to source; now sharing is preserved wherever possible and branched if source zones are not output

Removed#

  • Breaking: dat.Write’s sig_digits parameter — replaced by precision.


0.1.1#

Updated variable array access and other improvements.

Added#

  • tecio.ZoneList / tecio.VariableList container types for Read.zone and ReadZone.variable, with slicing and exact-name lookup.

  • ReadZone.get_array(key) for direct array access by index, name, or list of names.

  • tec2mat command line tool to convert input Tecplot file to MATLAB compatible .mat file format. Importable as a MATLAB structure with all zones, variables, and metadata.

Changed#

  • Read.zone / ReadZone.variable now return ZoneList / VariableList instead of plain list.

  • Read tests rewritten to match writer-test conventions (fixtures, pytest.raises, class grouping).

Fixed#

  • Legacy style unstructured zone headers in ASCII files use different keywords for data packing and zone type resulting in tecio interpreting these as single point ordered zone. These special cases have been added.

Removed#

  • Breaking: attribute-style variable access (zone.x) — was broken (infinite recursion) on SZL and case-insensitive on PLT. Use zone.get_array("x") instead.


0.1.0#

First stable release of tecio-python.

Added#

  • tecio.open() unified entry point supporting r, w, x, a, and a+ modes across all three file formats

  • SZL (.szplt) read and write via the TecIO C library new API

  • PLT (.plt) binary read via a pure-Python parser and write via the classic TecIO API

  • DAT (.dat / .tec) ASCII read and write with BLOCK and POINT datapacking support

  • Support for ordered (IJK) and simple finite-element zone types (FELINESEG, FETRIANGLE, FEQUADRILATERAL, FETETRAHEDRON, FEBRICK)

  • Variable sharing, passive variables, and zone-level auxiliary data

  • Dataset-level and variable-level auxiliary data read and write

  • CLI tools: tecdump, tecextract, teconvert, tecscale, tecmerge, tecslice, tecstats, tecfix

  • GitHub Actions CI with ruff formatting, linting, ty type checking, and pytest

  • Apache 2.0 license

Planned improvements#

  • FEMIXED zone support

  • FEPOLYGON and FEPOLYHEDRON write support for PLT and DAT formats

  • Python wrappers for libteciompi.so to enable parallel I/O

  • In-memory data containers with simple IO interface