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:
TecplotZoneReaderRead-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_elementsandface_right_elementshold, 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
bownsboundary_connection_counts[b]consecutive entries ofboundary_connection_elementsandboundary_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_countsis synthesized (all 2) andface_nodeshas2 * num_facesentries.- 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
auxdataZone-level auxiliary data.
Connections of each boundary face, shape
(num_boundary_faces,).0-based neighbor element of every boundary connection, flat.
Running offsets into the boundary connection arrays.
0-based zone of the neighbor of every boundary connection, flat.
datapackingOn-disk value layout for this zone.
Element on the left of each face, shape
(num_faces,), see class doc.Number of nodes of each face, shape
(num_faces,).Running offsets into
face_nodes, shape(num_faces + 1,).Flat 0-based node indices of all faces, in face order.
Element on the right of each face, shape
(num_faces,), see class doc.Total number of boundary connections over all boundary faces.
Number of boundary faces.
Number of elements/cells.
Number of faces.
Number of nodes/points.
0-based source zone index if connectivity is shared, else None.
solution_timeSolution time, 0.0 for static data.
strand_idStrand ID, 0 for static data.
titleZone title string.
variablesVariables in this zone, by 0-based index or exact name.
zone_index0-based zone index within the dataset.
zone_typeThe zone's
ZoneType.Methods
Return the faces of every element as
(offsets, faces).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
earefaces[offsets[e]:offsets[e + 1]], in ascending face order. They come fromface_left_elementsandface_right_elements. A side that is no element of this zone (-1or 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
offsetswith shape(num_elements + 1,)and the flatfaces.
- element_nodes()[source]#
Return the distinct nodes of every element as
(offsets, nodes).The nodes of element
earenodes[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
offsetswith shape(num_elements + 1,)and the flatnodes.
- 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
fareface_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.
0-based source zone index if connectivity is shared, else None.