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