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.
Files changed (35) hide show
  1. tecio/__init__.py +42 -1
  2. tecio/_constants.py +2 -2
  3. tecio/_dat_write.py +32 -0
  4. tecio/_elements.py +1311 -0
  5. tecio/_io.py +49 -4
  6. tecio/_meta.py +8 -0
  7. tecio/_plt_write.py +32 -0
  8. tecio/_reader.py +157 -3
  9. tecio/_szl_read.py +99 -3
  10. tecio/_szl_write.py +261 -0
  11. tecio/_utils.py +10 -10
  12. tecio/_writer.py +234 -3
  13. tecio/cli/tec2mat.py +20 -0
  14. tecio/cli/tecaux.py +11 -1
  15. tecio/cli/tecdump.py +24 -1
  16. tecio/cli/tecelretyp.py +1096 -0
  17. tecio/cli/tecextract.py +21 -2
  18. tecio/cli/tecfix.py +16 -1
  19. tecio/cli/tecmerge.py +226 -34
  20. tecio/cli/teconvert.py +12 -2
  21. tecio/cli/tecscale.py +16 -1
  22. tecio/cli/tecslice.py +24 -3
  23. tecio/libtecio.py +75 -6
  24. {tecio_python-0.4.1.data → tecio_python-0.4.2.data}/data/share/tecio/plugins/paraview/TecplotTecioReader.py +1 -1
  25. {tecio_python-0.4.1.dist-info → tecio_python-0.4.2.dist-info}/METADATA +9 -9
  26. tecio_python-0.4.2.dist-info/RECORD +40 -0
  27. {tecio_python-0.4.1.dist-info → tecio_python-0.4.2.dist-info}/entry_points.txt +1 -0
  28. tecio_python-0.4.1.dist-info/RECORD +0 -38
  29. {tecio_python-0.4.1.data → tecio_python-0.4.2.data}/data/share/tecio/plugins/matlab/contourfe.m +0 -0
  30. {tecio_python-0.4.1.data → tecio_python-0.4.2.data}/data/share/tecio/plugins/matlab/tecmat2struct.m +0 -0
  31. {tecio_python-0.4.1.data → tecio_python-0.4.2.data}/data/share/tecio/plugins/paraview/TecplotTecioWriter.py +0 -0
  32. {tecio_python-0.4.1.dist-info → tecio_python-0.4.2.dist-info}/WHEEL +0 -0
  33. {tecio_python-0.4.1.dist-info → tecio_python-0.4.2.dist-info}/licenses/LICENSE +0 -0
  34. {tecio_python-0.4.1.dist-info → tecio_python-0.4.2.dist-info}/licenses/NOTICE +0 -0
  35. {tecio_python-0.4.1.dist-info → tecio_python-0.4.2.dist-info}/top_level.txt +0 -0
tecio/__init__.py CHANGED
@@ -11,7 +11,7 @@ from importlib import metadata
11
11
  try:
12
12
  __version__ = metadata.version("tecio")
13
13
  except metadata.PackageNotFoundError:
14
- __version__ = "0.4.1"
14
+ __version__ = "0.4.2"
15
15
 
16
16
  from . import cli, libtecio
17
17
  from ._constants import (
@@ -30,6 +30,19 @@ from ._constants import (
30
30
  from ._containers import VariableList, ZoneList
31
31
  from ._dat_read import TecplotDatReader
32
32
  from ._dat_write import TecplotDatWriter
33
+ from ._elements import (
34
+ UNKNOWN_SHAPE,
35
+ cell_face_neighbors,
36
+ classify_cells,
37
+ collapse_cells,
38
+ collapsed_zone_type,
39
+ degenerate_edges,
40
+ expand_cells,
41
+ match_cells,
42
+ match_nodes,
43
+ shape_counts,
44
+ split_cells_by_shape,
45
+ )
33
46
  from ._io import (
34
47
  AppendReadWrite,
35
48
  AppendWrite,
@@ -48,6 +61,7 @@ from ._plt_read import TecplotPltReader
48
61
  from ._plt_write import TecplotPltWriter
49
62
  from ._reader import (
50
63
  TecplotAuxDataReader,
64
+ TecplotFEMixedZoneReader,
51
65
  TecplotFEZoneReader,
52
66
  TecplotOrderedZoneReader,
53
67
  TecplotPolyZoneReader,
@@ -62,6 +76,20 @@ from ._writer import EmptyZoneWarning, TecplotWriter
62
76
  # Ensure these display as their canonical public name in docs and help(),
63
77
  # rather than the private module they're actually defined in.
64
78
  open.__module__ = "tecio"
79
+ for _func in (
80
+ cell_face_neighbors,
81
+ classify_cells,
82
+ collapse_cells,
83
+ collapsed_zone_type,
84
+ degenerate_edges,
85
+ expand_cells,
86
+ match_cells,
87
+ match_nodes,
88
+ shape_counts,
89
+ split_cells_by_shape,
90
+ ):
91
+ _func.__module__ = "tecio"
92
+ del _func
65
93
  for _cls in (
66
94
  AppendWrite,
67
95
  AppendReadWrite,
@@ -71,6 +99,7 @@ for _cls in (
71
99
  TecplotZoneReader,
72
100
  TecplotOrderedZoneReader,
73
101
  TecplotFEZoneReader,
102
+ TecplotFEMixedZoneReader,
74
103
  TecplotPolyZoneReader,
75
104
  TecplotVariableReader,
76
105
  TecplotAuxDataReader,
@@ -118,6 +147,7 @@ __all__ = [
118
147
  "TecplotZoneReader",
119
148
  "TecplotOrderedZoneReader",
120
149
  "TecplotFEZoneReader",
150
+ "TecplotFEMixedZoneReader",
121
151
  "TecplotPolyZoneReader",
122
152
  "TecplotVariableReader",
123
153
  "TecplotAuxDataReader",
@@ -129,6 +159,17 @@ __all__ = [
129
159
  "TecplotPltWriter",
130
160
  "TecplotDatWriter",
131
161
  "EmptyZoneWarning",
162
+ "UNKNOWN_SHAPE",
163
+ "cell_face_neighbors",
164
+ "classify_cells",
165
+ "collapse_cells",
166
+ "collapsed_zone_type",
167
+ "degenerate_edges",
168
+ "expand_cells",
169
+ "match_cells",
170
+ "match_nodes",
171
+ "shape_counts",
172
+ "split_cells_by_shape",
132
173
  "Boolean",
133
174
  "DataPacking",
134
175
  "DataType",
tecio/_constants.py CHANGED
@@ -148,13 +148,13 @@ class FeCellShape(Enum):
148
148
  - 3D four-node element.
149
149
  * - ``HEXAHEDRON``
150
150
  - ``4``
151
- - 3D six-node element.
151
+ - 3D eight-node element.
152
152
  * - ``PYRAMID``
153
153
  - ``5``
154
154
  - 3D five-node element.
155
155
  * - ``PRISM``
156
156
  - ``6``
157
- - 3D eight-node element.
157
+ - 3D six-node element.
158
158
  """
159
159
 
160
160
  BAR = 0
tecio/_dat_write.py CHANGED
@@ -27,6 +27,7 @@ from ._constants import (
27
27
  DataPacking,
28
28
  DataType,
29
29
  FaceNeighborMode,
30
+ FeCellShape,
30
31
  FileType,
31
32
  ValueLocation,
32
33
  ZoneType,
@@ -938,6 +939,37 @@ class TecplotDatWriter(TecplotWriter):
938
939
  )
939
940
  )
940
941
 
942
+ def write_femixed_zone(
943
+ self,
944
+ data: Sequence[npt.ArrayLike],
945
+ cell_shapes: Sequence[FeCellShape | int | str] | None = None,
946
+ node_maps: Sequence[npt.ArrayLike] | None = None,
947
+ *,
948
+ title: str | None = None,
949
+ variables: list[str] | None = None,
950
+ value_locations: Sequence[ValueLocation] | None = None,
951
+ passive_vars: PassiveVarsSpec | None = None,
952
+ var_sharing: VarSharingSpec | None = None,
953
+ con_sharing: int | None = None,
954
+ solution_time: float = 0.0,
955
+ strand_id: int = 0,
956
+ aux: dict[str, Any] | None = None,
957
+ datapacking: DataPacking | str = DataPacking.BLOCK,
958
+ ) -> None:
959
+ """Not supported: DAT files cannot hold FEMIXED zones.
960
+
961
+ The signature matches :meth:`TecplotSzlWriter.write_femixed_zone` so every
962
+ writer exposes the same interface.
963
+
964
+ Raises:
965
+ NotImplementedError: Always. Write a ``.szplt`` file instead, see
966
+ :meth:`TecplotSzlWriter.write_femixed_zone`.
967
+ """
968
+ raise NotImplementedError(
969
+ "The DAT file format does not support FEMIXED (mixed finite-element) "
970
+ "zones. Write a .szplt file instead."
971
+ )
972
+
941
973
  def write_poly_zone(
942
974
  self,
943
975
  data: Sequence[npt.ArrayLike],