tecio.libtecio#

Python bindings for the TecIO C library.

Provides enum types for Tecplot constants, ctypes bindings for both the new SZL API (tec_*) and the classic PLT API (tec*142), and Python wrapper functions for each C entry point.

The libtecio module provides the direct interface with the TecIO C library functions. Each are wrapped in an equivalent Python function which also handles conversions from Python data objects to C compatible objects, and vis versa for the read functions.

These are the basis of the tecio Python package, and each submodule provides a higher level interface with these functions. However, the the Python wrapper functions in this submodule are kept in the public API to allow users directly call the TecIO library if desired.

Enums#

See Enums for full documentation.

FileFormat

Binary data format selector.

FileType

Tecplot file type.

ZoneType

Tecplot zone type.

DataType

On-disk storage type for variable data.

ValueLocation

Data value location within a cell.

FaceNeighborMode

Boundary face-sharing mode between zones.

FeCellShape

Unstructured cell shape category.

DataPacking

Zone data packing order for ASCII (.dat) files.

VarStatus

Variable active/passive flag.

Boolean

Boolean flag for C function arguments.

Exceptions#

class tecio.libtecio.TecioError[source]#

Bases: RuntimeError

Exception for TecIO C library errors.

__init__(*args, **kwargs)#
classmethod __new__(*args, **kwargs)#

SZL Read Functions#

See SZL Read Functions for full documentation.

tec_file_reader_open

Open an SZL file for reading.

tec_file_reader_close

Close an SZL file reader handle and release its resources.

tec_file_get_type

Get the file type for an opened SZL file.

tec_data_set_get_title

Read the dataset title string.

tec_data_set_get_num_vars

Query the number of variables in the dataset.

tec_data_set_get_num_zones

Query the number of zones in the dataset.

tec_zone_get_ijk

Get zone dimensions (ORDERED) or node/element counts (FE).

tec_zone_get_title

Read the title for a zone.

tec_zone_get_type

Query the zone type.

tec_zone_is_enabled

Check whether a zone is enabled.

tec_zone_get_solution_time

Read the solution time for a zone.

tec_zone_get_strand_id

Get the strand ID for a zone.

is_64bit

Check whether a zone's node-map uses 64-bit indices.

tec_zone_node_map_get_64

Read a 64-bit node map for an FE zone.

tec_zone_node_map_get

Read a 32-bit node map for an FE zone.

tec_var_get_name

Get a variable name by index.

tec_var_is_enabled

Check whether a variable is enabled.

tec_zone_var_get_type

Get the data type for a variable in a zone.

tec_zone_var_get_value_location

Get the value location for a zone variable.

tec_zone_var_is_passive

Check whether a zone variable is passive.

tec_zone_var_get_shared_zone

Get the shared zone index for a variable.

tec_zone_var_get_num_values

Query the number of values for a zone variable.

tec_zone_var_get_float_values

Read float32 values for a zone variable.

tec_zone_var_get_double_values

Read float64 values for a zone variable.

tec_zone_var_get_int32_values

Read int32 values for a zone variable.

tec_zone_var_get_int16_values

Read int16 values for a zone variable.

tec_zone_var_get_uint8_values

Read uint8 values for a zone variable.

tec_data_set_aux_data_get_num_items

Get the number of dataset-level auxiliary data items.

tec_data_set_aux_data_get_item

Read a dataset-level auxiliary data item.

tec_var_aux_data_get_num_items

Get the number of auxiliary data items for a variable.

tec_var_aux_data_get_item

Read a variable-level auxiliary data item.

tec_zone_aux_data_get_num_items

Get the number of auxiliary data items for a zone.

tec_zone_aux_data_get_item

Read a zone-level auxiliary data item.

SZL Write Functions#

See SZL Write Functions for full documentation.

tec_file_writer_open

Open a writer handle for creating SZL files.

tec_file_writer_close

Close a writer handle and finalise the output file.

tec_zone_create_ijk

Create an ordered IJK zone for writing.

tec_zone_create_fe

Create a finite-element zone for writing.

tec_zone_set_unsteady_options

Set time/strand metadata for a zone.

tec_zone_var_write_double_values

Write float64 values for a zone variable.

tec_zone_var_write_float_values

Write float32 values for a zone variable.

tec_zone_var_write_int32_values

Write int32 values for a zone variable.

tec_zone_var_write_int16_values

Write int16 values for a zone variable.

tec_zone_var_write_uint8_values

Write uint8 values for a zone variable.

tec_zone_node_map_write32

Write 32-bit node map entries for an FE zone.

tec_zone_node_map_write64

Write 64-bit node map entries for an FE zone.

tec_zone_face_nbr_write_connections32

Write 32-bit face-neighbor connections for an FE zone.

tec_zone_face_nbr_write_connections64

Write 64-bit face-neighbor connections for an FE zone.

tec_data_set_add_aux_data

Add a dataset-level auxiliary data record.

tec_var_add_aux_data

Add a variable-level auxiliary data record.

tec_zone_add_aux_data

Add a zone-level auxiliary data record.

Classic API Functions#

See Classic API Functions for full documentation.

tecini142

Initialise a Tecplot data file (classic API).

tecend142

Finalise and close the active Tecplot data file.

tecflush142

Flush data to disk, optionally retaining zones in memory (SZL only).

tecfil142

Get the file handle for the current output file.

tecforeign142

Set foreign byte order for output.

teczne142

Create a new zone in the active file (classic API).

tecpolyzne142

Create a polygonal or polyhedral zone (classic API).

tecznefemixed142

Create a mixed finite-element zone (classic API).

tecdat142

Write field data to the current zone (classic API).

tecnode142

Write node connectivity for an FE zone (classic API).

tecface142

Write face-neighbor connections (classic API).

tecpolyface142

Write face data for polygonal/polyhedral zones (classic API).

tecpolybconn142

Write boundary connections for poly zones (classic API).

tecauxstr142

Add dataset-level auxiliary data (classic API).

tecvauxstr142

Add variable-level auxiliary data (classic API).

teczauxstr142

Add zone-level auxiliary data (classic API).

tecusr142

Write a user-defined data record (classic API).