tecio-python 0.4.2__tar.gz → 0.4.3__tar.gz
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_python-0.4.2/tecio_python.egg-info → tecio_python-0.4.3}/PKG-INFO +1 -1
- {tecio_python-0.4.2 → tecio_python-0.4.3}/pyproject.toml +2 -1
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/__init__.py +1 -1
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_plt_read.py +26 -14
- tecio_python-0.4.3/tecio/cli/tectable.py +1134 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3/tecio_python.egg-info}/PKG-INFO +1 -1
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio_python.egg-info/SOURCES.txt +1 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio_python.egg-info/entry_points.txt +1 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tests/test_cli.py +780 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tests/test_elements.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tests/test_write.py +38 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/LICENSE +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/NOTICE +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/README.md +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/plugins/matlab/contourfe.m +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/plugins/matlab/tecmat2struct.m +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/plugins/paraview/TecplotTecioReader.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/plugins/paraview/TecplotTecioWriter.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/setup.cfg +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_constants.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_containers.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_dat_read.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_dat_write.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_elements.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_io.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_meta.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_plt_legacy.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_plt_write.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_reader.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_szl_read.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_szl_write.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_utils.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_writer.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/__init__.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tec2mat.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecaux.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecdump.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecelretyp.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecextract.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecfix.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecmerge.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/teconvert.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecscale.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecslice.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecstats.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/libtecio.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio_python.egg-info/dependency_links.txt +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio_python.egg-info/requires.txt +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio_python.egg-info/top_level.txt +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tests/test_io.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tests/test_libtecio.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tests/test_read.py +0 -0
- {tecio_python-0.4.2 → tecio_python-0.4.3}/tests/test_read_legacy.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "tecio-python"
|
|
7
|
-
version = "0.4.
|
|
7
|
+
version = "0.4.3"
|
|
8
8
|
license = "Apache-2.0"
|
|
9
9
|
description = "Python interface for reading and writing Tecplot data files"
|
|
10
10
|
|
|
@@ -48,6 +48,7 @@ tecmerge = "tecio.cli.tecmerge:main"
|
|
|
48
48
|
tecscale = "tecio.cli.tecscale:main"
|
|
49
49
|
tecslice = "tecio.cli.tecslice:main"
|
|
50
50
|
tecstats = "tecio.cli.tecstats:main"
|
|
51
|
+
tectable = "tecio.cli.tectable:main"
|
|
51
52
|
|
|
52
53
|
[project.optional-dependencies]
|
|
53
54
|
dev = [
|
|
@@ -819,11 +819,13 @@ class _PltParser:
|
|
|
819
819
|
def _var_value_count(self, meta: _ZoneMeta, var_idx: int) -> int:
|
|
820
820
|
"""Return the number of values on disk for variable *var_idx*.
|
|
821
821
|
|
|
822
|
-
For cell-centered variables in ORDERED zones the PLT format
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
822
|
+
For cell-centered variables in ORDERED zones the PLT format pads every
|
|
823
|
+
dimension but the last one with more than one node (see Note 5 of the format
|
|
824
|
+
spec): ``IMax * JMax * (KMax - 1)`` values on disk for an IJK-ordered zone,
|
|
825
|
+
``IMax * (JMax - 1)`` for an IJ-ordered zone and ``IMax - 1`` for an I-ordered
|
|
826
|
+
zone. The significant cell count is ``(I-1) * (J-1) * (K-1)``; the remainder
|
|
827
|
+
are ghost (zero-padded) values that are trimmed in
|
|
828
|
+
:meth:`TecplotPltVariableReader.get_values` after reshaping.
|
|
827
829
|
|
|
828
830
|
For FE zones, cell-centered variables store exactly one value per element with
|
|
829
831
|
no padding.
|
|
@@ -835,10 +837,14 @@ class _PltParser:
|
|
|
835
837
|
j = max(meta.j_max, 1)
|
|
836
838
|
k = max(meta.k_max, 1)
|
|
837
839
|
if loc == ValueLocation.CELL_CENTERED:
|
|
838
|
-
# PLT Note 5:
|
|
839
|
-
# reduced;
|
|
840
|
-
# Fortran-order layout.
|
|
841
|
-
|
|
840
|
+
# PLT Note 5: only the last dimension with more than one node is
|
|
841
|
+
# reduced; the dimensions before it retain their full extent as ghost
|
|
842
|
+
# padding in the Fortran-order layout.
|
|
843
|
+
if k > 1:
|
|
844
|
+
return i * j * (k - 1)
|
|
845
|
+
if j > 1:
|
|
846
|
+
return i * (j - 1)
|
|
847
|
+
return max(i - 1, 1)
|
|
842
848
|
return i * j * k
|
|
843
849
|
else:
|
|
844
850
|
# FE zones — no ghost padding.
|
|
@@ -1260,11 +1266,17 @@ class TecplotPltVariableReader(TecplotVariableReader):
|
|
|
1260
1266
|
if full_read and meta.zone_type == ZoneType.ORDERED:
|
|
1261
1267
|
ni, nj, nk = meta.i_max, meta.j_max, meta.k_max
|
|
1262
1268
|
if meta.value_locations[self.var_index] == ValueLocation.CELL_CENTERED:
|
|
1263
|
-
# On disk:
|
|
1264
|
-
# the last row
|
|
1265
|
-
# then slice to (ni-1, nj-1, nk-1) to
|
|
1266
|
-
# return only significant cells.
|
|
1267
|
-
|
|
1269
|
+
# On disk: the padded layout of _var_value_count in Fortran order. Ghost
|
|
1270
|
+
# padding occupies the last row of each padded dimension after reshape,
|
|
1271
|
+
# so reshape to the padded shape then slice to (ni-1, nj-1, nk-1) to
|
|
1272
|
+
# discard the ghost values and return only significant cells.
|
|
1273
|
+
if nk > 1:
|
|
1274
|
+
padded = (ni, nj, nk - 1)
|
|
1275
|
+
elif nj > 1:
|
|
1276
|
+
padded = (ni, nj - 1, 1)
|
|
1277
|
+
else:
|
|
1278
|
+
padded = (max(ni - 1, 1), 1, 1)
|
|
1279
|
+
data = data.reshape(padded, order="F")
|
|
1268
1280
|
data = data[: max(ni - 1, 1), : max(nj - 1, 1), :]
|
|
1269
1281
|
else:
|
|
1270
1282
|
shape = (ni, nj, nk)
|