tecio.TecplotPolyZoneReader#

class tecio.TecplotPolyZoneReader(zone_index, title, zone_type, solution_time, strand_id, datapacking, num_nodes, num_elements, num_faces, num_boundary_faces, num_boundary_connections, shared_connectivity)#

Bases: TecplotZoneReader

Read-only handle to one FEPOLYGON or FEPOLYHEDRON (face-based) zone.

A poly zone stores faces instead of per-element node lists. Every face lists its nodes and the elements on its left and right. All indices are 0-based. The face arrays are flat and are returned as stored in the file, never split per element.

face_left_elements and face_right_elements hold, for each face:

  • >= 0: the 0-based element index.

  • -1 (NO_ELEMENT): no element on that side (a domain boundary).

  • <= -2: a boundary face, an entry in the boundary connection arrays, used for neighbors in other zones or faces with several neighbors. The boundary face index is -2 - value (BOUNDARY_REF_BASE).

Boundary face b owns boundary_connection_counts[b] consecutive entries of boundary_connection_elements and boundary_connection_zones, which hold the 0-based neighbor element and the 0-based zone containing it.

Face-neighbor connections (FaceNeighborMode) do not apply to poly zones, the left and right elements play that role.

For a FEPOLYGON zone each face is an edge with exactly 2 nodes. Its face_node_counts is synthesized (all 2) and face_nodes has 2 * num_faces entries.

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

  • title – Zone title.

  • zone_type – FEPOLYGON or FEPOLYHEDRON.

  • 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.

  • num_faces – Number of faces.

  • num_boundary_faces – Number of boundary faces.

  • num_boundary_connections – Total number of boundary connections.

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

Attributes

auxdata

Zone-level auxiliary data.

boundary_connection_counts

Connections of each boundary face, shape (num_boundary_faces,).

boundary_connection_elements

0-based neighbor element of every boundary connection, flat.

boundary_connection_offsets

Running offsets into the boundary connection arrays.

boundary_connection_zones

0-based zone of the neighbor of every boundary connection, flat.

datapacking

On-disk value layout for this zone.

face_left_elements

Element on the left of each face, shape (num_faces,), see class doc.

face_node_counts

Number of nodes of each face, shape (num_faces,).

face_node_offsets

Running offsets into face_nodes, shape (num_faces + 1,).

face_nodes

Flat 0-based node indices of all faces, in face order.

face_right_elements

Element on the right of each face, shape (num_faces,), see class doc.

num_boundary_connections

Total number of boundary connections over all boundary faces.

num_boundary_faces

Number of boundary faces.

num_elements

Number of elements/cells.

num_faces

Number of faces.

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

element_faces()

Return the faces of every element as (offsets, faces).

element_nodes()

Return the distinct nodes of every element as (offsets, nodes).

get_array(key)

Return variable data array(s) for this zone.

is_enabled()

True unless the zone reports itself disabled.

property boundary_connection_counts#

Connections of each boundary face, shape (num_boundary_faces,).

property boundary_connection_elements#

0-based neighbor element of every boundary connection, flat.

property boundary_connection_offsets#

Running offsets into the boundary connection arrays.

Shape (num_boundary_faces + 1,).

property boundary_connection_zones#

0-based zone of the neighbor of every boundary connection, flat.

element_faces()[source]#

Return the faces of every element as (offsets, faces).

The faces of element e are faces[offsets[e]:offsets[e + 1]], in ascending face order. They come from face_left_elements and face_right_elements. A side that is no element of this zone (-1 or a boundary face reference) is skipped, so a face next to another zone is listed only for its own element. The arrays are computed on each call, not cached.

Returns:

The offsets with shape (num_elements + 1,) and the flat faces.

element_nodes()[source]#

Return the distinct nodes of every element as (offsets, nodes).

The nodes of element e are nodes[offsets[e]:offsets[e + 1]]. They are the nodes of the element’s faces with repeats removed, in ascending order. That is a set, not a cell node order, because a polyhedron has no natural node order. The arrays are computed on each call, not cached.

Returns:

The offsets with shape (num_elements + 1,) and the flat nodes.

property face_left_elements#

Element on the left of each face, shape (num_faces,), see class doc.

property face_node_counts#

Number of nodes of each face, shape (num_faces,).

property face_node_offsets#

Running offsets into face_nodes, shape (num_faces + 1,).

The nodes of face f are face_nodes[offsets[f]:offsets[f + 1]].

property face_nodes#

Flat 0-based node indices of all faces, in face order.

property face_right_elements#

Element on the right of each face, shape (num_faces,), see class doc.

property num_boundary_connections#

Total number of boundary connections over all boundary faces.

property num_boundary_faces#

Number of boundary faces.

property num_elements#

Number of elements/cells.

property num_faces#

Number of faces.

property num_nodes#

Number of nodes/points.

property shared_connectivity#

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