tecio-python 0.4.1__py3-none-any.whl → 0.4.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tecio/__init__.py +42 -1
- tecio/_constants.py +2 -2
- tecio/_dat_write.py +32 -0
- tecio/_elements.py +1311 -0
- tecio/_io.py +49 -4
- tecio/_meta.py +8 -0
- tecio/_plt_write.py +32 -0
- tecio/_reader.py +157 -3
- tecio/_szl_read.py +99 -3
- tecio/_szl_write.py +261 -0
- tecio/_utils.py +10 -10
- tecio/_writer.py +234 -3
- tecio/cli/tec2mat.py +20 -0
- tecio/cli/tecaux.py +11 -1
- tecio/cli/tecdump.py +24 -1
- tecio/cli/tecelretyp.py +1096 -0
- tecio/cli/tecextract.py +21 -2
- tecio/cli/tecfix.py +16 -1
- tecio/cli/tecmerge.py +226 -34
- tecio/cli/teconvert.py +12 -2
- tecio/cli/tecscale.py +16 -1
- tecio/cli/tecslice.py +24 -3
- tecio/libtecio.py +75 -6
- {tecio_python-0.4.1.data → tecio_python-0.4.2.data}/data/share/tecio/plugins/paraview/TecplotTecioReader.py +1 -1
- {tecio_python-0.4.1.dist-info → tecio_python-0.4.2.dist-info}/METADATA +9 -9
- tecio_python-0.4.2.dist-info/RECORD +40 -0
- {tecio_python-0.4.1.dist-info → tecio_python-0.4.2.dist-info}/entry_points.txt +1 -0
- tecio_python-0.4.1.dist-info/RECORD +0 -38
- {tecio_python-0.4.1.data → tecio_python-0.4.2.data}/data/share/tecio/plugins/matlab/contourfe.m +0 -0
- {tecio_python-0.4.1.data → tecio_python-0.4.2.data}/data/share/tecio/plugins/matlab/tecmat2struct.m +0 -0
- {tecio_python-0.4.1.data → tecio_python-0.4.2.data}/data/share/tecio/plugins/paraview/TecplotTecioWriter.py +0 -0
- {tecio_python-0.4.1.dist-info → tecio_python-0.4.2.dist-info}/WHEEL +0 -0
- {tecio_python-0.4.1.dist-info → tecio_python-0.4.2.dist-info}/licenses/LICENSE +0 -0
- {tecio_python-0.4.1.dist-info → tecio_python-0.4.2.dist-info}/licenses/NOTICE +0 -0
- {tecio_python-0.4.1.dist-info → tecio_python-0.4.2.dist-info}/top_level.txt +0 -0
tecio/cli/tec2mat.py
CHANGED
|
@@ -188,6 +188,7 @@ from typing import Any
|
|
|
188
188
|
import numpy as np
|
|
189
189
|
|
|
190
190
|
from .. import (
|
|
191
|
+
TecplotFEMixedZoneReader,
|
|
191
192
|
TecplotFEZoneReader,
|
|
192
193
|
TecplotOrderedZoneReader,
|
|
193
194
|
TecplotPolyZoneReader,
|
|
@@ -370,6 +371,17 @@ def _zone_to_dict(zone: TecplotZoneReader, num_vars: int) -> dict[str, Any]:
|
|
|
370
371
|
elif isinstance(zone, (TecplotFEZoneReader, TecplotPolyZoneReader)):
|
|
371
372
|
d["num_nodes"] = int(zone.num_nodes)
|
|
372
373
|
d["num_elements"] = int(zone.num_elements)
|
|
374
|
+
elif isinstance(zone, TecplotFEMixedZoneReader):
|
|
375
|
+
d["num_nodes"] = int(zone.num_nodes)
|
|
376
|
+
d["num_elements"] = int(zone.num_elements)
|
|
377
|
+
d["num_sections"] = np.int32(zone.num_sections)
|
|
378
|
+
# An object array of strings becomes a MATLAB cell array.
|
|
379
|
+
d["section_shapes"] = np.array(
|
|
380
|
+
[shape.name for shape in zone.section_shapes], dtype=object
|
|
381
|
+
)
|
|
382
|
+
d["section_num_elements"] = np.asarray(
|
|
383
|
+
zone.section_num_elements, dtype=np.int64
|
|
384
|
+
)
|
|
373
385
|
|
|
374
386
|
# Empty placeholder for passive/shared variables -> MATLAB [].
|
|
375
387
|
empty = np.array([])
|
|
@@ -427,6 +439,14 @@ def _zone_to_dict(zone: TecplotZoneReader, num_vars: int) -> dict[str, Any]:
|
|
|
427
439
|
# zone_<src>.node_map themselves.
|
|
428
440
|
if isinstance(zone, TecplotPolyZoneReader):
|
|
429
441
|
_add_poly_face_map(d, zone)
|
|
442
|
+
elif isinstance(zone, TecplotFEMixedZoneReader):
|
|
443
|
+
# One node map per section, ``node_map_1``, ``node_map_2``, ..., 1-based.
|
|
444
|
+
con_src = zone.shared_connectivity
|
|
445
|
+
if con_src is not None:
|
|
446
|
+
d["node_map_shared_from"] = np.int32(con_src + 1)
|
|
447
|
+
else:
|
|
448
|
+
for k, node_map in enumerate(zone.node_maps, start=1):
|
|
449
|
+
d[f"node_map_{k}"] = node_map + 1
|
|
430
450
|
elif isinstance(zone, TecplotFEZoneReader):
|
|
431
451
|
con_src = zone.shared_connectivity
|
|
432
452
|
if con_src is not None:
|
tecio/cli/tecaux.py
CHANGED
|
@@ -184,6 +184,7 @@ from typing import Any
|
|
|
184
184
|
import numpy as np
|
|
185
185
|
|
|
186
186
|
from .. import (
|
|
187
|
+
TecplotFEMixedZoneReader,
|
|
187
188
|
TecplotFEZoneReader,
|
|
188
189
|
TecplotOrderedZoneReader,
|
|
189
190
|
TecplotPolyZoneReader,
|
|
@@ -679,9 +680,18 @@ def _write_zone_data(
|
|
|
679
680
|
con_sharing=con_sharing,
|
|
680
681
|
**fe_kw,
|
|
681
682
|
)
|
|
683
|
+
elif isinstance(zone, TecplotFEMixedZoneReader):
|
|
684
|
+
con_sharing = zone.shared_connectivity
|
|
685
|
+
writer.write_femixed_zone(
|
|
686
|
+
data=writer_data,
|
|
687
|
+
cell_shapes=None if con_sharing is not None else zone.section_shapes,
|
|
688
|
+
node_maps=None if con_sharing is not None else zone.node_maps,
|
|
689
|
+
con_sharing=con_sharing,
|
|
690
|
+
**common_kw,
|
|
691
|
+
)
|
|
682
692
|
else:
|
|
683
693
|
raise NotImplementedError(
|
|
684
|
-
f"Zone '{zone.title}' is neither an ordered, classic FE nor poly "
|
|
694
|
+
f"Zone '{zone.title}' is neither an ordered, classic FE, FEMIXED nor poly "
|
|
685
695
|
"zone; writing is not supported for it."
|
|
686
696
|
)
|
|
687
697
|
|
tecio/cli/tecdump.py
CHANGED
|
@@ -79,7 +79,12 @@ from collections.abc import Sequence
|
|
|
79
79
|
|
|
80
80
|
import numpy as np
|
|
81
81
|
|
|
82
|
-
from .. import
|
|
82
|
+
from .. import (
|
|
83
|
+
TecplotFEMixedZoneReader,
|
|
84
|
+
TecplotFEZoneReader,
|
|
85
|
+
TecplotOrderedZoneReader,
|
|
86
|
+
TecplotPolyZoneReader,
|
|
87
|
+
)
|
|
83
88
|
from .. import open as tecio_open
|
|
84
89
|
|
|
85
90
|
|
|
@@ -212,6 +217,19 @@ def main(argv: Sequence[str] | None = None) -> int:
|
|
|
212
217
|
elif isinstance(zone, TecplotFEZoneReader):
|
|
213
218
|
print(f" Num Nodes : {zone.num_nodes}")
|
|
214
219
|
print(f" Num Elements : {zone.num_elements}")
|
|
220
|
+
elif isinstance(zone, TecplotFEMixedZoneReader):
|
|
221
|
+
print(f" Num Nodes : {zone.num_nodes}")
|
|
222
|
+
print(f" Num Elements : {zone.num_elements}")
|
|
223
|
+
print(f" Num Sections : {zone.num_sections}")
|
|
224
|
+
for k, (shape, count) in enumerate(
|
|
225
|
+
zip(
|
|
226
|
+
zone.section_shapes,
|
|
227
|
+
zone.section_num_elements,
|
|
228
|
+
strict=True,
|
|
229
|
+
)
|
|
230
|
+
):
|
|
231
|
+
print(f" Section {k:2} : {shape.name}, {count}")
|
|
232
|
+
print(f" Shared Connectivity : {zone.shared_connectivity}")
|
|
215
233
|
elif isinstance(zone, TecplotPolyZoneReader):
|
|
216
234
|
print(f" Num Nodes : {zone.num_nodes}")
|
|
217
235
|
print(f" Num Elements : {zone.num_elements}")
|
|
@@ -261,6 +279,11 @@ def main(argv: Sequence[str] | None = None) -> int:
|
|
|
261
279
|
)
|
|
262
280
|
print(f" Face Connections : {value_str}")
|
|
263
281
|
|
|
282
|
+
# Show the section node maps for FEMIXED zones
|
|
283
|
+
if isinstance(zone, TecplotFEMixedZoneReader):
|
|
284
|
+
for k, node_map in enumerate(zone.node_maps):
|
|
285
|
+
_print_array(f"Section {k} Node Map", node_map)
|
|
286
|
+
|
|
264
287
|
# Show the face map and boundary connections for poly zones. Zones
|
|
265
288
|
# that share connectivity print the face map of their source zone.
|
|
266
289
|
if isinstance(zone, TecplotPolyZoneReader):
|