tecio.TecplotFEZoneReader#

class tecio.TecplotFEZoneReader(zone_index, title, zone_type, solution_time, strand_id, datapacking, num_nodes, num_elements, shared_connectivity)#

Bases: TecplotZoneReader

Read-only handle to one finite-element zone.

Covers the classic element zone types (FELINESEG through FEBRICK). Face-based FEPOLYGON and FEPOLYHEDRON zones are read by TecplotPolyZoneReader.

Parameters:
  • zone_index – 0-based zone index within the dataset.

  • title – Zone title.

  • zone_type – The zone’s ZoneType.

  • solution_time – Solution time, 0.0 for static data.

  • strand_id – Strand ID, 0 for static data.

  • datapacking – On-disk value layout.

  • num_nodes – Number of nodes/points.

  • num_elements – Number of elements/cells.

  • shared_connectivity – 0-based source zone index if this zone’s connectivity is shared, else None.

Attributes

auxdata

Zone-level auxiliary data.

datapacking

On-disk value layout for this zone.

face_neighbor_mode

This zone's face-neighbor connection mode.

face_neighbors_complete

Whether this zone's explicit face-neighbor data is exhaustive.

node_map

Node connectivity array (num_elements, nodes_per_cell).

nodes_per_cell

Nodes per cell, fixed by zone type.

num_elements

Number of elements/cells.

num_face_connections

Number of face-neighbor connections in this zone, else None.

num_nodes

Number of nodes/points.

shared_connectivity

0-based source zone index if connectivity is shared, else None.

solution_time

Solution time, 0.0 for static data.

strand_id

Strand ID, 0 for static data.

title

Zone title string.

variables

Variables in this zone, by 0-based index or exact name.

zone_index

0-based zone index within the dataset.

zone_type

The zone's ZoneType.

Methods

get_array(key)

Return variable data array(s) for this zone.

get_face_connections([reshape])

This zone's face-neighbor connections, else None.

is_enabled()

True unless the zone reports itself disabled.

property face_neighbor_mode#

This zone’s face-neighbor connection mode.

None if the zone has no face-neighbor connections, or if this format doesn’t (yet) support reading them, unstructured connectivity alone already implies node adjacency; face neighbors only exist to state adjacency explicitly for non-conformal or multi-zone-connected meshes, which most FE zones don’t need. Cheap: reading this never loads the connections themselves, only the small metadata it’s paired with, so it’s safe to check on every zone without cost.

property face_neighbors_complete#

Whether this zone’s explicit face-neighbor data is exhaustive.

Tecplot can auto-detect ordinary conformal adjacency from the node map alone; explicit face-neighbor data exists for what auto-detection can’t find (non-conformal interfaces, cross-zone adjacency). True means the explicit data is the entire adjacency picture, nothing else to auto-detect. False means it’s a supplement, Tecplot still auto-detects the rest. None means either this zone has no face-neighbor data at all (see face_neighbor_mode), or this format has no way to represent the distinction: only DAT’s ASCII format actually carries this flag (FEFACENEIGHBORSCOMPLETE); neither the classic nor new C APIs have an equivalent, so PLT and SZL always report None here even when face-neighbor data exists.

get_face_connections(reshape=False)[source]#

This zone’s face-neighbor connections, else None.

Loaded and cached on first access (flat form), independently of face_neighbor_mode/num_face_connections, reading those never triggers this.

Parameters:

reshape – If True, and face_neighbor_mode is LOCAL_ONE_TO_ONE or GLOBAL_ONE_TO_ONE, reshape into a 2D array of shape (num_face_connections, 3 or 4) instead of the raw flat array. Raises for the “many” modes, a variable number of neighbor cells per connection means there’s no single rectangular shape to reshape into.

Returns:

Flat array (dtype int64) if reshape is False (the default), or a 2D array if reshape is True and the mode supports it. None if the zone has no face-neighbor connections.

Raises:

ValueError – If reshape is True and face_neighbor_mode is LOCAL_ONE_TO_MANY or GLOBAL_ONE_TO_MANY. Call without reshape, or use reshape_face_connections() directly, which handles the “many” modes too, returning a list of per-connection arrays instead of raising.

property node_map#

Node connectivity array (num_elements, nodes_per_cell).

None only if a format cannot resolve connectivity for this zone, e.g. when a shared-connectivity source zone is missing.

property nodes_per_cell#

Nodes per cell, fixed by zone type.

Raises:

ValueError – For a zone type without a fixed nodes-per-cell count (not expected here, TecplotFEZoneReader is only ever constructed for the classic FE types, but kept as a defensive check rather than an unchecked KeyError).

property num_elements#

Number of elements/cells.

property num_face_connections#

Number of face-neighbor connections in this zone, else None.

Not derivable from get_face_connections()’s result without loading it, and for the “many” modes, not derivable from its flat length at all, a variable number of neighbor cells per connection means the array’s length isn’t a fixed multiple of this count. Cheap either way: this never loads the connections themselves.

property num_nodes#

Number of nodes/points.

property shared_connectivity#

0-based source zone index if connectivity is shared, else None.