tecio-python 0.3.0__tar.gz → 0.3.2__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.3.0/tecio_python.egg-info → tecio_python-0.3.2}/PKG-INFO +8 -6
- {tecio_python-0.3.0 → tecio_python-0.3.2}/README.md +7 -5
- {tecio_python-0.3.0/tecio → tecio_python-0.3.2}/plugins/paraview/TecplotTecioReader.py +11 -7
- {tecio_python-0.3.0 → tecio_python-0.3.2}/pyproject.toml +5 -2
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/__init__.py +57 -6
- tecio_python-0.3.2/tecio/_constants.py +345 -0
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/_containers.py +21 -21
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/_dat_read.py +262 -103
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/_dat_write.py +161 -273
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/_io.py +27 -45
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/_meta.py +31 -16
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/_plt_read.py +244 -96
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/_plt_write.py +86 -285
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/_reader.py +278 -59
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/_szl_read.py +69 -41
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/_szl_write.py +131 -343
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/_utils.py +122 -0
- tecio_python-0.3.2/tecio/_writer.py +953 -0
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/cli/tec2mat.py +21 -5
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/cli/tecaux.py +21 -11
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/cli/tecdump.py +33 -18
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/cli/tecextract.py +131 -36
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/cli/tecfix.py +22 -9
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/cli/tecmerge.py +85 -44
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/cli/teconvert.py +18 -8
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/cli/tecscale.py +34 -24
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/cli/tecslice.py +29 -13
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/cli/tecstats.py +116 -50
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/libtecio.py +1742 -960
- {tecio_python-0.3.0 → tecio_python-0.3.2/tecio_python.egg-info}/PKG-INFO +8 -6
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio_python.egg-info/SOURCES.txt +2 -1
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tests/test_cli.py +131 -131
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tests/test_io.py +35 -35
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tests/test_libtecio.py +2 -2
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tests/test_read.py +100 -42
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tests/test_write.py +373 -119
- tecio_python-0.3.0/tecio/_writer.py +0 -331
- {tecio_python-0.3.0 → tecio_python-0.3.2}/LICENSE +0 -0
- {tecio_python-0.3.0 → tecio_python-0.3.2}/NOTICE +0 -0
- {tecio_python-0.3.0 → tecio_python-0.3.2}/setup.cfg +0 -0
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio/cli/__init__.py +0 -0
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio_python.egg-info/dependency_links.txt +0 -0
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio_python.egg-info/entry_points.txt +0 -0
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio_python.egg-info/requires.txt +0 -0
- {tecio_python-0.3.0 → tecio_python-0.3.2}/tecio_python.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tecio-python
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Python interface for reading and writing Tecplot data files
|
|
5
5
|
Project-URL: Homepage, https://github.com/meersman/tecio
|
|
6
6
|
Project-URL: Documentation, https://meersman.github.io/tecio/
|
|
@@ -82,6 +82,8 @@ export TECIO_LIB=/path/to/libtecio.dylib # macOS
|
|
|
82
82
|
|
|
83
83
|
## Quick start
|
|
84
84
|
|
|
85
|
+
Writing a file:
|
|
86
|
+
|
|
85
87
|
```python
|
|
86
88
|
import tecio
|
|
87
89
|
import numpy as np
|
|
@@ -90,7 +92,7 @@ x = np.linspace(0, 2 * np.pi, 100)
|
|
|
90
92
|
y = np.sin(x)
|
|
91
93
|
|
|
92
94
|
with tecio.open("sine.szplt", "w") as tec:
|
|
93
|
-
tec.
|
|
95
|
+
tec.write_ordered_zone(data=[x, y], variables=["x", "y"])
|
|
94
96
|
```
|
|
95
97
|
|
|
96
98
|
Reading a file:
|
|
@@ -98,10 +100,10 @@ Reading a file:
|
|
|
98
100
|
```python
|
|
99
101
|
with tecio.open("sine.szplt", "r") as tec:
|
|
100
102
|
print(tec.variables) # ['x', 'y']
|
|
101
|
-
x = tec.
|
|
102
|
-
y = tec.
|
|
103
|
+
x = tec.zones[0].variables[0].values
|
|
104
|
+
y = tec.zones[0].variables[1].values
|
|
103
105
|
# or
|
|
104
|
-
x, y = tec.
|
|
106
|
+
x, y = tec.zones[0].get_array(["x", "y"])
|
|
105
107
|
```
|
|
106
108
|
|
|
107
109
|
## API
|
|
@@ -129,7 +131,7 @@ Supported formats:
|
|
|
129
131
|
|
|
130
132
|
## Contributing
|
|
131
133
|
|
|
132
|
-
Contributions are welcome
|
|
134
|
+
Contributions are welcome (see [CONTRIBUTING.md](CONTRIBUTING.md) for details).
|
|
133
135
|
|
|
134
136
|
---
|
|
135
137
|
|
|
@@ -38,6 +38,8 @@ export TECIO_LIB=/path/to/libtecio.dylib # macOS
|
|
|
38
38
|
|
|
39
39
|
## Quick start
|
|
40
40
|
|
|
41
|
+
Writing a file:
|
|
42
|
+
|
|
41
43
|
```python
|
|
42
44
|
import tecio
|
|
43
45
|
import numpy as np
|
|
@@ -46,7 +48,7 @@ x = np.linspace(0, 2 * np.pi, 100)
|
|
|
46
48
|
y = np.sin(x)
|
|
47
49
|
|
|
48
50
|
with tecio.open("sine.szplt", "w") as tec:
|
|
49
|
-
tec.
|
|
51
|
+
tec.write_ordered_zone(data=[x, y], variables=["x", "y"])
|
|
50
52
|
```
|
|
51
53
|
|
|
52
54
|
Reading a file:
|
|
@@ -54,10 +56,10 @@ Reading a file:
|
|
|
54
56
|
```python
|
|
55
57
|
with tecio.open("sine.szplt", "r") as tec:
|
|
56
58
|
print(tec.variables) # ['x', 'y']
|
|
57
|
-
x = tec.
|
|
58
|
-
y = tec.
|
|
59
|
+
x = tec.zones[0].variables[0].values
|
|
60
|
+
y = tec.zones[0].variables[1].values
|
|
59
61
|
# or
|
|
60
|
-
x, y = tec.
|
|
62
|
+
x, y = tec.zones[0].get_array(["x", "y"])
|
|
61
63
|
```
|
|
62
64
|
|
|
63
65
|
## API
|
|
@@ -85,7 +87,7 @@ Supported formats:
|
|
|
85
87
|
|
|
86
88
|
## Contributing
|
|
87
89
|
|
|
88
|
-
Contributions are welcome
|
|
90
|
+
Contributions are welcome (see [CONTRIBUTING.md](CONTRIBUTING.md) for details).
|
|
89
91
|
|
|
90
92
|
---
|
|
91
93
|
|
|
@@ -119,8 +119,12 @@ if _TECIO_FALLBACK_PATH and _TECIO_FALLBACK_PATH not in sys.path:
|
|
|
119
119
|
|
|
120
120
|
try:
|
|
121
121
|
import tecio
|
|
122
|
-
from tecio import
|
|
123
|
-
|
|
122
|
+
from tecio import (
|
|
123
|
+
TecplotFEZoneReader,
|
|
124
|
+
TecplotOrderedZoneReader,
|
|
125
|
+
ValueLocation,
|
|
126
|
+
ZoneType,
|
|
127
|
+
)
|
|
124
128
|
|
|
125
129
|
_TECIO_IMPORT_ERROR: Exception | None = None
|
|
126
130
|
except Exception as exc: # pragma: no cover - environment-dependent # noqa: BLE001
|
|
@@ -445,7 +449,7 @@ class TecplotReader(VTKPythonAlgorithmBase):
|
|
|
445
449
|
|
|
446
450
|
self._zone_selection.RemoveAllArrays()
|
|
447
451
|
self._zone_keys.clear()
|
|
448
|
-
for zone in reader.
|
|
452
|
+
for zone in reader.zones:
|
|
449
453
|
title = zone.title or f"Zone {zone.zone_index}"
|
|
450
454
|
key = f"{zone.zone_index}: {title}"
|
|
451
455
|
self._zone_keys[zone.zone_index] = key
|
|
@@ -673,7 +677,7 @@ class TecplotReader(VTKPythonAlgorithmBase):
|
|
|
673
677
|
static/always-present geometry, so they're excluded from the time axis and
|
|
674
678
|
instead included at every requested time (see :meth:`RequestData`).
|
|
675
679
|
"""
|
|
676
|
-
times = {zone.solution_time for zone in reader.
|
|
680
|
+
times = {zone.solution_time for zone in reader.zones if zone.strand_id != 0}
|
|
677
681
|
return sorted(times)
|
|
678
682
|
|
|
679
683
|
@smproperty.doublevector(
|
|
@@ -756,7 +760,7 @@ class TecplotReader(VTKPythonAlgorithmBase):
|
|
|
756
760
|
self._add_variable_aux_field_data(output.GetFieldData(), reader)
|
|
757
761
|
|
|
758
762
|
block_index = 0
|
|
759
|
-
for zone in reader.
|
|
763
|
+
for zone in reader.zones:
|
|
760
764
|
key = self._zone_keys.get(zone.zone_index)
|
|
761
765
|
if key is not None and not self._zone_selection.ArrayIsEnabled(key):
|
|
762
766
|
continue
|
|
@@ -986,7 +990,7 @@ class TecplotReader(VTKPythonAlgorithmBase):
|
|
|
986
990
|
n_points = dataset.GetNumberOfPoints()
|
|
987
991
|
n_cells = dataset.GetNumberOfCells()
|
|
988
992
|
|
|
989
|
-
for var in zone.
|
|
993
|
+
for var in zone.variables:
|
|
990
994
|
if not self._array_selection.ArrayIsEnabled(var.name):
|
|
991
995
|
continue
|
|
992
996
|
values = var.values
|
|
@@ -1035,7 +1039,7 @@ class TecplotReader(VTKPythonAlgorithmBase):
|
|
|
1035
1039
|
if name is None:
|
|
1036
1040
|
flat_components.append(None)
|
|
1037
1041
|
continue
|
|
1038
|
-
var = zone.
|
|
1042
|
+
var = zone.variables[name]
|
|
1039
1043
|
values = var.values
|
|
1040
1044
|
if values is None: # passive, or absent in this specific zone
|
|
1041
1045
|
flat_components.append(None)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "tecio-python"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.2"
|
|
8
8
|
description = "Python interface for reading and writing Tecplot data files"
|
|
9
9
|
|
|
10
10
|
readme = "README.md"
|
|
@@ -69,6 +69,9 @@ mat = ["scipy"]
|
|
|
69
69
|
include = ["tecio*"]
|
|
70
70
|
exclude = ["archive*", "test*"]
|
|
71
71
|
|
|
72
|
+
[tool.setuptools.data-files]
|
|
73
|
+
"share/tecio/plugins/paraview" = ["plugins/paraview/TecplotTecioReader.py"]
|
|
74
|
+
|
|
72
75
|
[tool.ruff]
|
|
73
76
|
line-length = 88
|
|
74
77
|
target-version = "py310"
|
|
@@ -109,7 +112,7 @@ python-version = "3.11"
|
|
|
109
112
|
output-format = "concise"
|
|
110
113
|
|
|
111
114
|
[[tool.ty.overrides]]
|
|
112
|
-
include = ["
|
|
115
|
+
include = ["plugins/**"]
|
|
113
116
|
|
|
114
117
|
[tool.ty.overrides.rules]
|
|
115
118
|
unresolved-import = "ignore"
|
|
@@ -9,9 +9,22 @@ from importlib import metadata
|
|
|
9
9
|
try:
|
|
10
10
|
__version__ = metadata.version("tecio")
|
|
11
11
|
except metadata.PackageNotFoundError:
|
|
12
|
-
__version__ = "0.3.
|
|
12
|
+
__version__ = "0.3.2"
|
|
13
13
|
|
|
14
14
|
from . import cli, libtecio
|
|
15
|
+
from ._constants import (
|
|
16
|
+
Boolean,
|
|
17
|
+
DataPacking,
|
|
18
|
+
DataType,
|
|
19
|
+
Debug,
|
|
20
|
+
FaceNeighborMode,
|
|
21
|
+
FeCellShape,
|
|
22
|
+
FileFormat,
|
|
23
|
+
FileType,
|
|
24
|
+
ValueLocation,
|
|
25
|
+
VarStatus,
|
|
26
|
+
ZoneType,
|
|
27
|
+
)
|
|
15
28
|
from ._containers import VariableList, ZoneList
|
|
16
29
|
from ._dat_read import TecplotDatReader
|
|
17
30
|
from ._dat_write import TecplotDatWriter
|
|
@@ -33,11 +46,11 @@ from ._writer import TecplotWriter
|
|
|
33
46
|
# Ensure these display as their canonical public name in docs and help(),
|
|
34
47
|
# rather than the private module they're actually defined in.
|
|
35
48
|
open.__module__ = "tecio"
|
|
36
|
-
AppendWrite.__module__ = "tecio"
|
|
37
|
-
AppendReadWrite.__module__ = "tecio"
|
|
38
|
-
ZoneList.__module__ = "tecio"
|
|
39
|
-
VariableList.__module__ = "tecio"
|
|
40
49
|
for _cls in (
|
|
50
|
+
AppendWrite,
|
|
51
|
+
AppendReadWrite,
|
|
52
|
+
ZoneList,
|
|
53
|
+
VariableList,
|
|
41
54
|
TecplotReader,
|
|
42
55
|
TecplotZoneReader,
|
|
43
56
|
TecplotOrderedZoneReader,
|
|
@@ -51,6 +64,17 @@ for _cls in (
|
|
|
51
64
|
TecplotSzlWriter,
|
|
52
65
|
TecplotPltWriter,
|
|
53
66
|
TecplotDatWriter,
|
|
67
|
+
Boolean,
|
|
68
|
+
DataPacking,
|
|
69
|
+
DataType,
|
|
70
|
+
Debug,
|
|
71
|
+
FaceNeighborMode,
|
|
72
|
+
FeCellShape,
|
|
73
|
+
FileFormat,
|
|
74
|
+
FileType,
|
|
75
|
+
ValueLocation,
|
|
76
|
+
VarStatus,
|
|
77
|
+
ZoneType,
|
|
54
78
|
):
|
|
55
79
|
_cls.__module__ = "tecio"
|
|
56
80
|
del _cls
|
|
@@ -76,5 +100,32 @@ __all__ = [
|
|
|
76
100
|
"TecplotSzlWriter",
|
|
77
101
|
"TecplotPltWriter",
|
|
78
102
|
"TecplotDatWriter",
|
|
79
|
-
"
|
|
103
|
+
"Boolean",
|
|
104
|
+
"DataPacking",
|
|
105
|
+
"DataType",
|
|
106
|
+
"Debug",
|
|
107
|
+
"FaceNeighborMode",
|
|
108
|
+
"FeCellShape",
|
|
109
|
+
"FileFormat",
|
|
110
|
+
"FileType",
|
|
111
|
+
"ValueLocation",
|
|
112
|
+
"VarStatus",
|
|
113
|
+
"ZoneType",
|
|
80
114
|
]
|
|
115
|
+
|
|
116
|
+
_STANDARD_MODULE_ATTRIBUTES = (
|
|
117
|
+
"__name__",
|
|
118
|
+
"__file__",
|
|
119
|
+
"__path__",
|
|
120
|
+
"__doc__",
|
|
121
|
+
"__all__",
|
|
122
|
+
"__package__",
|
|
123
|
+
"__version__",
|
|
124
|
+
"__cached__",
|
|
125
|
+
"__spec__",
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
# Only public API visible to user
|
|
130
|
+
def __dir__() -> list:
|
|
131
|
+
return sorted((*_STANDARD_MODULE_ATTRIBUTES, *__all__))
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
"""Tecplot meaningful integers.
|
|
2
|
+
|
|
3
|
+
The TecIO library often uses integers with special meanings (zone types, data types,
|
|
4
|
+
data locations). The same values are used both for writing (``tec*142`` functions) and
|
|
5
|
+
for SZL reading and writing (``tec_*`` functions). Where available, the equivalent
|
|
6
|
+
keyword used in Tecplot ASCII files is exposed as a class property, returning the
|
|
7
|
+
corresponding int value.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
from enum import Enum
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"Boolean",
|
|
16
|
+
"DataPacking",
|
|
17
|
+
"DataType",
|
|
18
|
+
"Debug",
|
|
19
|
+
"FaceNeighborMode",
|
|
20
|
+
"FeCellShape",
|
|
21
|
+
"FileFormat",
|
|
22
|
+
"FileType",
|
|
23
|
+
"ValueLocation",
|
|
24
|
+
"VarStatus",
|
|
25
|
+
"ZoneType",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class FileFormat(Enum):
|
|
30
|
+
"""Binary data format selector.
|
|
31
|
+
|
|
32
|
+
.. list-table::
|
|
33
|
+
:header-rows: 1
|
|
34
|
+
:widths: 25 10 65
|
|
35
|
+
|
|
36
|
+
* - Attribute
|
|
37
|
+
- Value
|
|
38
|
+
- Description
|
|
39
|
+
* - ``PLT``
|
|
40
|
+
- ``0``
|
|
41
|
+
- Classic PLT binary format.
|
|
42
|
+
* - ``SZPLT``
|
|
43
|
+
- ``1``
|
|
44
|
+
- SZL subzone-loadable format.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
PLT = 0
|
|
48
|
+
SZPLT = 1
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class FileType(Enum):
|
|
52
|
+
"""Tecplot file type.
|
|
53
|
+
|
|
54
|
+
.. list-table::
|
|
55
|
+
:header-rows: 1
|
|
56
|
+
:widths: 25 10 65
|
|
57
|
+
|
|
58
|
+
* - Attribute
|
|
59
|
+
- Value
|
|
60
|
+
- Description
|
|
61
|
+
* - ``FULL``
|
|
62
|
+
- ``0``
|
|
63
|
+
- Contains both grid and solution data.
|
|
64
|
+
* - ``GRID``
|
|
65
|
+
- ``1``
|
|
66
|
+
- Grid coordinates only.
|
|
67
|
+
* - ``SOLUTION``
|
|
68
|
+
- ``2``
|
|
69
|
+
- Solution variables only.
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
FULL = 0
|
|
73
|
+
GRID = 1
|
|
74
|
+
SOLUTION = 2
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class ZoneType(Enum):
|
|
78
|
+
"""Tecplot zone type.
|
|
79
|
+
|
|
80
|
+
.. list-table::
|
|
81
|
+
:header-rows: 1
|
|
82
|
+
:widths: 25 10 65
|
|
83
|
+
|
|
84
|
+
* - Attribute
|
|
85
|
+
- Value
|
|
86
|
+
- Description
|
|
87
|
+
* - ``ORDERED``
|
|
88
|
+
- ``0``
|
|
89
|
+
- Structured IJK grid.
|
|
90
|
+
* - ``FELINESEG``
|
|
91
|
+
- ``1``
|
|
92
|
+
- Finite-element line segments.
|
|
93
|
+
* - ``FETRIANGLE``
|
|
94
|
+
- ``2``
|
|
95
|
+
- Finite-element triangles.
|
|
96
|
+
* - ``FEQUADRILATERAL``
|
|
97
|
+
- ``3``
|
|
98
|
+
- Finite-element quadrilaterals.
|
|
99
|
+
* - ``FETETRAHEDRON``
|
|
100
|
+
- ``4``
|
|
101
|
+
- Finite-element tetrahedra.
|
|
102
|
+
* - ``FEBRICK``
|
|
103
|
+
- ``5``
|
|
104
|
+
- Finite-element hexahedra.
|
|
105
|
+
* - ``FEPOLYGON``
|
|
106
|
+
- ``6``
|
|
107
|
+
- Finite-element polygons (face-based).
|
|
108
|
+
* - ``FEPOLYHEDRON``
|
|
109
|
+
- ``7``
|
|
110
|
+
- Finite-element polyhedra (face-based).
|
|
111
|
+
* - ``FEMIXED``
|
|
112
|
+
- ``8``
|
|
113
|
+
- Mixed finite-element types.
|
|
114
|
+
"""
|
|
115
|
+
|
|
116
|
+
ORDERED = 0
|
|
117
|
+
FELINESEG = 1
|
|
118
|
+
FETRIANGLE = 2
|
|
119
|
+
FEQUADRILATERAL = 3
|
|
120
|
+
FETETRAHEDRON = 4
|
|
121
|
+
FEBRICK = 5
|
|
122
|
+
FEPOLYGON = 6
|
|
123
|
+
FEPOLYHEDRON = 7
|
|
124
|
+
FEMIXED = 8
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class FeCellShape(Enum):
|
|
128
|
+
"""Unstructured cell shape category.
|
|
129
|
+
|
|
130
|
+
.. list-table::
|
|
131
|
+
:header-rows: 1
|
|
132
|
+
:widths: 25 10 65
|
|
133
|
+
|
|
134
|
+
* - Attribute
|
|
135
|
+
- Value
|
|
136
|
+
- Description
|
|
137
|
+
* - ``BAR``
|
|
138
|
+
- ``0``
|
|
139
|
+
- 2D two-node element.
|
|
140
|
+
* - ``TRIANGLE``
|
|
141
|
+
- ``1``
|
|
142
|
+
- 2D three-node element.
|
|
143
|
+
* - ``QUADRILATERAL``
|
|
144
|
+
- ``2``
|
|
145
|
+
- 2D four-node element.
|
|
146
|
+
* - ``TETRAHEDRON``
|
|
147
|
+
- ``3``
|
|
148
|
+
- 3D four-node element.
|
|
149
|
+
* - ``HEXAHEDRON``
|
|
150
|
+
- ``4``
|
|
151
|
+
- 3D six-node element.
|
|
152
|
+
* - ``PYRAMID``
|
|
153
|
+
- ``5``
|
|
154
|
+
- 3D five-node element.
|
|
155
|
+
* - ``PRISM``
|
|
156
|
+
- ``6``
|
|
157
|
+
- 3D eight-node element.
|
|
158
|
+
"""
|
|
159
|
+
|
|
160
|
+
BAR = 0
|
|
161
|
+
TRIANGLE = 1
|
|
162
|
+
QUADRILATERAL = 2
|
|
163
|
+
TETRAHEDRON = 3
|
|
164
|
+
HEXAHEDRON = 4
|
|
165
|
+
PYRAMID = 5
|
|
166
|
+
PRISM = 6
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
class FaceNeighborMode(Enum):
|
|
170
|
+
"""Boundary face-sharing mode between zones.
|
|
171
|
+
|
|
172
|
+
.. list-table::
|
|
173
|
+
:header-rows: 1
|
|
174
|
+
:widths: 35 10 55
|
|
175
|
+
|
|
176
|
+
* - Attribute
|
|
177
|
+
- Value
|
|
178
|
+
- Description
|
|
179
|
+
* - ``LOCAL_ONE_TO_ONE``
|
|
180
|
+
- ``0``
|
|
181
|
+
- Each face has at most one local neighbor.
|
|
182
|
+
* - ``LOCAL_ONE_TO_MANY``
|
|
183
|
+
- ``1``
|
|
184
|
+
- Each face may have multiple local neighbors (hanging nodes).
|
|
185
|
+
* - ``GLOBAL_ONE_TO_ONE``
|
|
186
|
+
- ``2``
|
|
187
|
+
- Each face has at most one neighbor in any zone.
|
|
188
|
+
* - ``GLOBAL_ONE_TO_MANY``
|
|
189
|
+
- ``3``
|
|
190
|
+
- Each face may have multiple neighbors in any zone (hanging nodes).
|
|
191
|
+
"""
|
|
192
|
+
|
|
193
|
+
LOCAL_ONE_TO_ONE = 0
|
|
194
|
+
LOCAL_ONE_TO_MANY = 1
|
|
195
|
+
GLOBAL_ONE_TO_ONE = 2
|
|
196
|
+
GLOBAL_ONE_TO_MANY = 3
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
class ValueLocation(Enum):
|
|
200
|
+
"""Data value location within a cell.
|
|
201
|
+
|
|
202
|
+
.. list-table::
|
|
203
|
+
:header-rows: 1
|
|
204
|
+
:widths: 25 10 65
|
|
205
|
+
|
|
206
|
+
* - Attribute
|
|
207
|
+
- Value
|
|
208
|
+
- Description
|
|
209
|
+
* - ``CELL_CENTERED``
|
|
210
|
+
- ``0``
|
|
211
|
+
- Values stored at cell centres.
|
|
212
|
+
* - ``NODAL``
|
|
213
|
+
- ``1``
|
|
214
|
+
- Values stored at grid nodes.
|
|
215
|
+
"""
|
|
216
|
+
|
|
217
|
+
CELL_CENTERED = 0
|
|
218
|
+
NODAL = 1
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
class DataPacking(Enum):
|
|
222
|
+
"""Zone data packing order for ASCII (``.dat``) files.
|
|
223
|
+
|
|
224
|
+
Controls whether data is laid out variable-by-variable or point-by-point
|
|
225
|
+
in the ASCII file. The ``DATAPACKING`` keyword in a zone header takes one
|
|
226
|
+
of these two values.
|
|
227
|
+
|
|
228
|
+
.. list-table::
|
|
229
|
+
:header-rows: 1
|
|
230
|
+
:widths: 25 10 65
|
|
231
|
+
|
|
232
|
+
* - Attribute
|
|
233
|
+
- Value
|
|
234
|
+
- Description
|
|
235
|
+
* - ``POINT``
|
|
236
|
+
- ``0``
|
|
237
|
+
- One row per node/cell containing all variable values.
|
|
238
|
+
* - ``BLOCK``
|
|
239
|
+
- ``1``
|
|
240
|
+
- One contiguous block per variable containing all node/cell values.
|
|
241
|
+
Tecplot default; faster for variable-at-a-time access patterns.
|
|
242
|
+
"""
|
|
243
|
+
|
|
244
|
+
POINT = 0
|
|
245
|
+
BLOCK = 1
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
class DataType(Enum):
|
|
249
|
+
"""On-disk storage type for variable data.
|
|
250
|
+
|
|
251
|
+
.. list-table::
|
|
252
|
+
:header-rows: 1
|
|
253
|
+
:widths: 25 10 65
|
|
254
|
+
|
|
255
|
+
* - Attribute
|
|
256
|
+
- Value
|
|
257
|
+
- Description
|
|
258
|
+
* - ``FLOAT``
|
|
259
|
+
- ``1``
|
|
260
|
+
- 32-bit IEEE floating point.
|
|
261
|
+
* - ``DOUBLE``
|
|
262
|
+
- ``2``
|
|
263
|
+
- 64-bit IEEE floating point.
|
|
264
|
+
* - ``INT32``
|
|
265
|
+
- ``3``
|
|
266
|
+
- 32-bit signed integer.
|
|
267
|
+
* - ``INT16``
|
|
268
|
+
- ``4``
|
|
269
|
+
- 16-bit signed integer.
|
|
270
|
+
* - ``BYTE``
|
|
271
|
+
- ``5``
|
|
272
|
+
- 8-bit unsigned integer.
|
|
273
|
+
"""
|
|
274
|
+
|
|
275
|
+
FLOAT = 1
|
|
276
|
+
DOUBLE = 2
|
|
277
|
+
INT32 = 3
|
|
278
|
+
INT16 = 4
|
|
279
|
+
BYTE = 5
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
class VarStatus(Enum):
|
|
283
|
+
"""Variable active/passive flag.
|
|
284
|
+
|
|
285
|
+
.. list-table::
|
|
286
|
+
:header-rows: 1
|
|
287
|
+
:widths: 25 10 65
|
|
288
|
+
|
|
289
|
+
* - Attribute
|
|
290
|
+
- Value
|
|
291
|
+
- Description
|
|
292
|
+
* - ``ACTIVE``
|
|
293
|
+
- ``0``
|
|
294
|
+
- Variable has data in this zone.
|
|
295
|
+
* - ``PASSIVE``
|
|
296
|
+
- ``1``
|
|
297
|
+
- Variable has no data in this zone.
|
|
298
|
+
"""
|
|
299
|
+
|
|
300
|
+
ACTIVE = 0
|
|
301
|
+
PASSIVE = 1
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
class Boolean(Enum):
|
|
305
|
+
"""Boolean flag for C function arguments.
|
|
306
|
+
|
|
307
|
+
.. list-table::
|
|
308
|
+
:header-rows: 1
|
|
309
|
+
:widths: 25 10 65
|
|
310
|
+
|
|
311
|
+
* - Attribute
|
|
312
|
+
- Value
|
|
313
|
+
- Description
|
|
314
|
+
* - ``FALSE``
|
|
315
|
+
- ``0``
|
|
316
|
+
- Logical false.
|
|
317
|
+
* - ``TRUE``
|
|
318
|
+
- ``1``
|
|
319
|
+
- Logical true.
|
|
320
|
+
"""
|
|
321
|
+
|
|
322
|
+
FALSE = 0
|
|
323
|
+
TRUE = 1
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
class Debug(Enum):
|
|
327
|
+
"""Debug flag for C function arguments.
|
|
328
|
+
|
|
329
|
+
.. list-table::
|
|
330
|
+
:header-rows: 1
|
|
331
|
+
:widths: 25 10 65
|
|
332
|
+
|
|
333
|
+
* - Attribute
|
|
334
|
+
- Value
|
|
335
|
+
- Description
|
|
336
|
+
* - ``FALSE``
|
|
337
|
+
- ``0``
|
|
338
|
+
- Debug output disabled.
|
|
339
|
+
* - ``TRUE``
|
|
340
|
+
- ``1``
|
|
341
|
+
- Debug output enabled.
|
|
342
|
+
"""
|
|
343
|
+
|
|
344
|
+
FALSE = 0
|
|
345
|
+
TRUE = 1
|