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#
tectableconsole 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_countsanddegenerate_edgesdetect cells written asFEBRICKorFEQUADRILATERALwith repeated node indices (tetrahedra, pyramids, prisms, triangles).collapsed_zone_typeandcollapse_cellscollapse such cells to their natural zone type (FEBRICKtoFETETRAHEDRON,FEQUADRILATERALtoFETRIANGLE) and keep the cell handedness.expand_cellsgoes the other way.split_cells_by_shapeseparates padded cells in aFEBRICKorFEQUADRILATERALzone by shape for writing them as aFEMIXEDzone. Pyramids and prisms keep the handedness of the brick they came from.cell_face_neighborsfinds the cell across every face of every cell from the node map alone, for triangles, quadrilaterals, tetrahedra and bricks. It returns-1for boundary faces.match_nodesandmatch_cellsfind 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, orNoneif the zones do not match.
TecplotPolyZoneReader.element_faces()andelement_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.tecelretypconsole 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-gridnow 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-basedface_nodes,face_node_counts,face_left_elements,face_right_elementsand boundary connection arrays, returned as stored on disk. Newwrite_poly_zonewriter method (BLOCK packing only; SZPLT raisesNotImplementedError). Connectivity sharing and append mode work with poly zones. Every CLI tool that rewrites a file (teconvert,tecextract,tecfix,tecscale,tecaux,tecmergeandtecslice) now carries poly zones through, and exits with an error when asked to write them to SZPLT.tecmerge --merge-gridwrites an identical poly grid once and shares it across zones (for example transient steps), matching on a hash of the full face map.tecdumpreports poly counts andtec2matexports a 1-based face map. Legacy PLT v111 poly zones are readable.
Fixed#
tecslice -tnow writes “anchor” zones for dropped sources to keep the variables that are shared from them and every shared zone is renumbered.tecextractandtecmergenow remap zones for poly boundary connections.tecmerge --merge-gridno longer drops a zone whose only variables are grid variables to preserve boundary connections.tecpolybconn142wrapper 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 sotecio.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, andtecio.open()raisesValueErrorfor'a'and'a+'on a legacy file. See the new “Legacy PLT Versions” documentation page for a version-by-version comparison..bbinand.bbin8file extensions are now recognized as Tecplot PLT binary files.tecscalecan now transform multiple variables in a single call.New
--strand-offsetflag fortecmergeto 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
tecmat2structto reformat the zone structures created bytec2matinto 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. Thetecio.libtecioC 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"]andvar_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
tecioare now automatically added to the installsharefolder 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_zonerenamed towrite_ordered_zone, for symmetry withwrite_fe_zone.Breaking: Reader container properties renamed for clarity:
.zone→.zonesand.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
-hto see the available flags for each tool.pragma: no coveradded 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 intecio._constantsand are importable directly from the top-levelteciopackage (tecio.ZoneType, not justtecio.libtecio.ZoneType), matching every other public class. Still re-exported fromtecio.libteciofor backward compatibility.tecio.libtecio’s C-library load/bind mechanism is now implemented as reusable, stateless functions intecio._utils(load_library,bind,requires_symbol);libtecio.pyitself is reduced to the C function wrappers and their own state (lib,LIBRARY_LOAD_ERROR,LIBRARY_PATH,UNAVAILABLE_FUNCTIONS). No behavior change; importingtecio.libteciostill never raises, even with no Tecplot installation or an older one missing a newer symbol.bindis now keyword-only at its call sites for readability.
Fixed#
TecplotPltWriter.close()andTecplotDatWriter.close()now flush buffered auxiliary data, matchingTecplotSzlWriter’s existing behavior. Previously, callingadd_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— addsI,J,K,dimensions.TecplotFEZoneReader— addsnode_map,nodes_per_cell,shared_connectivity, andnum_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 fromtecio.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_indexis now part of the sharedTecplotZoneReaderinterface 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_cellraiseAttributeErroron an ordered zone (previously returnedNone);zone.I/.J/.K/.dimensionsraiseAttributeErroron an FE zone (previously unused placeholder values on some formats). Useisinstance(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 explicitvariableslist (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_mapfrom disk on every access instead of caching theNoneresult.
Removed#
Breaking:
tecio.szl,tecio.plt, andtecio.datsubmodules.szl.Read,szl.Write,plt.Read,plt.Write,dat.Read,dat.Writeno longer exist. UseTecplotSzlReader/TecplotSzlWriter, etc., imported directly fromtecio:# 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
SOLUTIONTIMEandSTRANDID.Provdes
.szpltfile format reading capability in ParaView.Automatically converts aux data to
vtkFieldData.
Fixed#
dat.Readdid not havezone_indexorvar_indexproperties. Fixed to matchszlandpltmodules.
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.flushoption 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#
precisionkeyword 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).ePLT defaults to
DataType.DOUBLEand 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 theDT=zone header keyword.
ReadZone.shared_connectivity— 1-based source zone index if a zone’s FE connectivity is shared, elseNone.Internal
WriterMeta/ZoneMetatracking (Write.meta) on all three writers: each zone records what was actually written so later zones validatevar_sharing/con_sharingagainst 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.valuesandzone.node_mapforward data arrays from the source zone (previously returnedNone). Usevariable.shared_zone/zone.shared_connectivityto check whether something is shared.
Fixed#
FE zone writers raised
IndexErrorwhennode_mapwas omitted for a zone sharing connectivity viacon_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
float64regardless of declared type; now defaults to SINGLE (not DOUBLE) whenDT=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’ssig_digitsparameter — replaced byprecision.
0.1.1#
Updated variable array access and other improvements.
Added#
tecio.ZoneList/tecio.VariableListcontainer types forRead.zoneandReadZone.variable, with slicing and exact-name lookup.ReadZone.get_array(key)for direct array access by index, name, or list of names.tec2matcommand line tool to convert input Tecplot file to MATLAB compatible.matfile format. Importable as a MATLAB structure with all zones, variables, and metadata.
Changed#
Read.zone/ReadZone.variablenow returnZoneList/VariableListinstead of plainlist.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
teciointerpreting 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. Usezone.get_array("x")instead.
0.1.0#
First stable release of tecio-python.
Added#
tecio.open()unified entry point supportingr,w,x,a, anda+modes across all three file formatsSZL (
.szplt) read and write via the TecIO C library new APIPLT (
.plt) binary read via a pure-Python parser and write via the classic TecIO APIDAT (
.dat/.tec) ASCII read and write withBLOCKandPOINTdatapacking supportSupport 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,tecfixGitHub Actions CI with ruff formatting, linting, ty type checking, and pytest
Apache 2.0 license
Planned improvements#
FEMIXEDzone supportFEPOLYGONandFEPOLYHEDRONwrite support for PLT and DAT formatsPython wrappers for
libteciompi.soto enable parallel I/OIn-memory data containers with simple IO interface