tecio.TecplotWriter#
- class tecio.TecplotWriter(path, title, variables, file_type)#
Bases:
ABCShared interface and lifecycle for all Tecplot file writers.
Concrete subclasses (
TecplotSzlWriter, …) differ in how a file is actually opened, closed, and written to, but share the same aux-data buffering, variable-list handling, and context-manager lifecycle, so application code can be written against this base without caring which format is being produced.- Parameters:
path – Output file path.
title – Dataset title.
variables – Variable name list.
Nonedefers file creation until the first zone-writing call (lazy open).file_type – File type enum (FULL, GRID, or SOLUTION).
- path#
Output file path.
- title#
Dataset title string.
- variables#
Variable name list, or
Noneif the file has not been opened yet.
- file_type#
File type (FULL, GRID, or SOLUTION).
- current_zone#
0-based index of the most recently written zone.
-1before any zone has been written; updated only after a zone-writing method successfully completes.
- auxdataset#
Buffered dataset-level auxiliary data, flushed before the first zone.
- auxvar#
Buffered variable-level auxiliary data, flushed before the first zone.
Attributes
Read-only record of everything written to this file so far.
Methods
add_auxdataset_dict(auxdict)Buffer dataset-level auxiliary data from a dictionary.
add_auxvar_dict(auxdict)Buffer variable-level auxiliary data from a dictionary.
close()Finalize and close the file.
Write buffered dataset- and variable-level aux data to the file.
write_fe_zone(data, zone_type, *[, ...])Write a complete finite-element zone.
write_femixed_zone(data[, cell_shapes, ...])Write a complete FEMIXED zone.
write_ordered_zone(data, *[, title, ...])Write a complete structured zone.
write_poly_zone(data, zone_type, *[, ...])Write a complete FEPOLYGON or FEPOLYHEDRON zone.
- flush_aux()[source]#
Write buffered dataset- and variable-level aux data to the file.
Called automatically before the first zone is written. Only needed directly if you want to flush explicitly, e.g. before checking
meta.
- property meta#
Read-only record of everything written to this file so far.
- abstractmethod write_fe_zone(data, zone_type, *, node_map=None, title=None, variables=None, value_locations=None, passive_vars=None, var_sharing=None, con_sharing=None, face_neighbors=None, face_neighbor_mode=None, solution_time=0.0, strand_id=0, aux=None)[source]#
Write a complete finite-element zone.
- abstractmethod write_femixed_zone(data, cell_shapes=None, node_maps=None, *, title=None, variables=None, value_locations=None, passive_vars=None, var_sharing=None, con_sharing=None, solution_time=0.0, strand_id=0, aux=None, datapacking=DataPacking.BLOCK)[source]#
Write a complete FEMIXED zone.
- abstractmethod write_ordered_zone(data, *, title=None, variables=None, value_locations=None, passive_vars=None, var_sharing=None, solution_time=0.0, strand_id=0, aux=None, datapacking=DataPacking.BLOCK)[source]#
Write a complete structured zone.
- abstractmethod write_poly_zone(data, zone_type, *, face_nodes=None, face_node_counts=None, face_left_elements=None, face_right_elements=None, boundary_connection_counts=None, boundary_connection_elements=None, boundary_connection_zones=None, title=None, variables=None, value_locations=None, passive_vars=None, var_sharing=None, con_sharing=None, solution_time=0.0, strand_id=0, aux=None, datapacking=DataPacking.BLOCK)[source]#
Write a complete FEPOLYGON or FEPOLYHEDRON zone.