ansys-fluent-core 0.27.dev1__py3-none-any.whl → 0.28.dev0__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.
Potentially problematic release.
This version of ansys-fluent-core might be problematic. Click here for more details.
- ansys/fluent/core/__init__.py +22 -9
- ansys/fluent/core/_version.py +5 -2
- ansys/fluent/core/codegen/__init__.py +0 -3
- ansys/fluent/core/codegen/allapigen.py +1 -5
- ansys/fluent/core/codegen/builtin_settingsgen.py +44 -10
- ansys/fluent/core/codegen/datamodelgen.py +53 -12
- ansys/fluent/core/codegen/settingsgen.py +21 -12
- ansys/fluent/core/codegen/settingsgen_old.py +2 -2
- ansys/fluent/core/codegen/tuigen.py +1 -1
- ansys/fluent/core/codegen/write_settings_yaml.py +3 -4
- ansys/fluent/core/data_model_cache.py +132 -70
- ansys/fluent/core/docs/README.rst +2 -2
- ansys/fluent/core/examples/downloads.py +3 -5
- ansys/fluent/core/exceptions.py +1 -0
- ansys/fluent/core/file_session.py +59 -131
- ansys/fluent/core/filereader/case_file.py +17 -17
- ansys/fluent/core/filereader/casereader.py +2 -1
- ansys/fluent/core/filereader/data_file.py +7 -7
- ansys/fluent/core/filereader/lispy.py +6 -1
- ansys/fluent/core/fluent_connection.py +35 -7
- ansys/fluent/core/generated/api_tree/api_objects.json +1 -1
- ansys/fluent/core/generated/datamodel_222/PMFileManagement.py +2 -2
- ansys/fluent/core/generated/datamodel_222/PartManagement.py +28 -28
- ansys/fluent/core/generated/datamodel_222/meshing.py +301 -301
- ansys/fluent/core/generated/datamodel_222/workflow.py +9 -9
- ansys/fluent/core/generated/datamodel_231/PMFileManagement.py +2 -2
- ansys/fluent/core/generated/datamodel_231/PartManagement.py +55 -55
- ansys/fluent/core/generated/datamodel_231/flicing.py +51 -51
- ansys/fluent/core/generated/datamodel_231/meshing.py +317 -317
- ansys/fluent/core/generated/datamodel_231/solverworkflow.py +51 -51
- ansys/fluent/core/generated/datamodel_231/workflow.py +9 -9
- ansys/fluent/core/generated/datamodel_232/PMFileManagement.py +2 -2
- ansys/fluent/core/generated/datamodel_232/PartManagement.py +55 -55
- ansys/fluent/core/generated/datamodel_232/flicing.py +51 -51
- ansys/fluent/core/generated/datamodel_232/meshing.py +335 -335
- ansys/fluent/core/generated/datamodel_232/solverworkflow.py +58 -58
- ansys/fluent/core/generated/datamodel_232/workflow.py +9 -9
- ansys/fluent/core/generated/datamodel_241/PMFileManagement.py +2 -2
- ansys/fluent/core/generated/datamodel_241/PartManagement.py +57 -57
- ansys/fluent/core/generated/datamodel_241/flicing.py +51 -51
- ansys/fluent/core/generated/datamodel_241/meshing.py +361 -361
- ansys/fluent/core/generated/datamodel_241/solverworkflow.py +58 -58
- ansys/fluent/core/generated/datamodel_241/workflow.py +9 -9
- ansys/fluent/core/generated/datamodel_242/MeshingUtilities.py +240 -240
- ansys/fluent/core/generated/datamodel_242/PMFileManagement.py +2 -2
- ansys/fluent/core/generated/datamodel_242/PartManagement.py +60 -60
- ansys/fluent/core/generated/datamodel_242/flicing.py +51 -51
- ansys/fluent/core/generated/datamodel_242/meshing.py +371 -371
- ansys/fluent/core/generated/datamodel_242/solverworkflow.py +58 -58
- ansys/fluent/core/generated/datamodel_242/workflow.py +9 -9
- ansys/fluent/core/generated/datamodel_251/MeshingUtilities.py +244 -244
- ansys/fluent/core/generated/datamodel_251/PMFileManagement.py +2 -2
- ansys/fluent/core/generated/datamodel_251/PartManagement.py +60 -60
- ansys/fluent/core/generated/datamodel_251/flicing.py +51 -51
- ansys/fluent/core/generated/datamodel_251/meshing.py +384 -382
- ansys/fluent/core/generated/datamodel_251/preferences.py +7 -0
- ansys/fluent/core/generated/datamodel_251/solverworkflow.py +58 -58
- ansys/fluent/core/generated/datamodel_251/workflow.py +10 -10
- ansys/fluent/core/generated/datamodel_252/MeshingUtilities.py +3664 -0
- ansys/fluent/core/generated/datamodel_252/PMFileManagement.py +288 -0
- ansys/fluent/core/generated/datamodel_252/PartManagement.py +2588 -0
- ansys/fluent/core/generated/datamodel_252/flicing.py +7972 -0
- ansys/fluent/core/generated/datamodel_252/meshing.py +2644 -0
- ansys/fluent/core/generated/datamodel_252/preferences.py +2760 -0
- ansys/fluent/core/generated/datamodel_252/solverworkflow.py +479 -0
- ansys/fluent/core/generated/datamodel_252/workflow.py +466 -0
- ansys/fluent/core/generated/fluent_version_251.py +4 -4
- ansys/fluent/core/generated/fluent_version_252.py +5 -0
- ansys/fluent/core/generated/meshing/tui_251.py +1139 -1179
- ansys/fluent/core/generated/meshing/tui_252.py +10181 -0
- ansys/fluent/core/generated/solver/settings_222.py +3 -3
- ansys/fluent/core/generated/solver/settings_231.py +4 -4
- ansys/fluent/core/generated/solver/settings_232.py +5 -5
- ansys/fluent/core/generated/solver/settings_241.py +5 -5
- ansys/fluent/core/generated/solver/settings_242.py +1185 -1185
- ansys/fluent/core/generated/solver/settings_251.py +1847 -1652
- ansys/fluent/core/generated/solver/settings_251.pyi +237 -211
- ansys/fluent/core/generated/solver/settings_252.py +90369 -0
- ansys/fluent/core/generated/solver/settings_252.pyi +63778 -0
- ansys/fluent/core/generated/solver/settings_builtin.py +612 -1
- ansys/fluent/core/generated/solver/settings_builtin.pyi +235 -0
- ansys/fluent/core/generated/solver/tui_251.py +2283 -2103
- ansys/fluent/core/generated/solver/tui_252.py +37720 -0
- ansys/fluent/core/journaling.py +1 -1
- ansys/fluent/core/launcher/error_handler.py +3 -0
- ansys/fluent/core/launcher/fluent_container.py +5 -0
- ansys/fluent/core/launcher/launcher.py +1 -2
- ansys/fluent/core/launcher/launcher_utils.py +17 -6
- ansys/fluent/core/launcher/process_launch_string.py +3 -3
- ansys/fluent/core/launcher/pyfluent_enums.py +1 -1
- ansys/fluent/core/launcher/slurm_launcher.py +2 -1
- ansys/fluent/core/launcher/standalone_launcher.py +11 -5
- ansys/fluent/core/launcher/watchdog.py +1 -1
- ansys/fluent/core/launcher/watchdog_exec +6 -3
- ansys/fluent/core/logging.py +1 -5
- ansys/fluent/core/parametric.py +6 -3
- ansys/fluent/core/post_objects/meta.py +1 -39
- ansys/fluent/core/post_objects/post_helper.py +4 -3
- ansys/fluent/core/post_objects/post_object_definitions.py +12 -7
- ansys/fluent/core/post_objects/post_objects_container.py +39 -2
- ansys/fluent/core/rpvars.py +2 -1
- ansys/fluent/core/scheduler/machine_list.py +3 -1
- ansys/fluent/core/search.py +109 -262
- ansys/fluent/core/services/__init__.py +3 -0
- ansys/fluent/core/services/api_upgrade.py +1 -0
- ansys/fluent/core/services/batch_ops.py +3 -1
- ansys/fluent/core/services/datamodel_se.py +37 -30
- ansys/fluent/core/services/datamodel_tui.py +8 -3
- ansys/fluent/core/services/deprecated_field_data.py +691 -0
- ansys/fluent/core/services/field_data.py +67 -357
- ansys/fluent/core/services/interceptors.py +6 -4
- ansys/fluent/core/services/reduction.py +1 -2
- ansys/fluent/core/services/scheme_eval.py +2 -3
- ansys/fluent/core/services/solution_variables.py +46 -48
- ansys/fluent/core/session.py +6 -4
- ansys/fluent/core/session_meshing.pyi +5 -0
- ansys/fluent/core/session_pure_meshing.pyi +4 -1
- ansys/fluent/core/session_solver_lite.py +2 -1
- ansys/fluent/core/solver/flobject.py +179 -207
- ansys/fluent/core/solver/flunits.py +65 -56
- ansys/fluent/core/solver/function/reduction.py +9 -29
- ansys/fluent/core/solver/settings_builtin_bases.py +28 -22
- ansys/fluent/core/solver/settings_builtin_data.py +105 -1
- ansys/fluent/core/solver/settings_external.py +0 -28
- ansys/fluent/core/streaming_services/field_data_streaming.py +1 -0
- ansys/fluent/core/streaming_services/monitor_streaming.py +0 -1
- ansys/fluent/core/systemcoupling.py +145 -14
- ansys/fluent/core/utils/__init__.py +18 -2
- ansys/fluent/core/utils/dump_session_data.py +7 -4
- ansys/fluent/core/utils/execution.py +2 -2
- ansys/fluent/core/utils/file_transfer_service.py +37 -42
- ansys/fluent/core/utils/fluent_version.py +20 -2
- ansys/fluent/core/utils/networking.py +39 -1
- ansys/fluent/core/workflow.py +3 -15
- ansys/fluent/tests/conftest.py +89 -7
- ansys/fluent/tests/fluent/test_version/test.py +2 -0
- ansys/fluent/tests/fluent_fixtures.py +195 -0
- ansys/fluent/tests/integration/test_optislang/test_optislang_integration.py +7 -7
- ansys/fluent/tests/parametric/test_parametric_workflow.py +14 -4
- ansys/fluent/tests/test_builtin_settings.py +28 -0
- ansys/fluent/tests/test_cad_to_post_ftm.py +1 -3
- ansys/fluent/tests/test_cad_to_post_wtm.py +1 -1
- ansys/fluent/tests/test_casereader.py +1 -1
- ansys/fluent/tests/test_codegen.py +116 -6
- ansys/fluent/tests/test_data_model_cache.py +1 -1
- ansys/fluent/tests/test_datamodel_service.py +14 -19
- ansys/fluent/tests/test_field_data.py +93 -45
- ansys/fluent/tests/test_file_session.py +32 -29
- ansys/fluent/tests/test_flobject.py +16 -58
- ansys/fluent/tests/test_fluent_fixes.py +5 -5
- ansys/fluent/tests/test_fluent_session.py +11 -8
- ansys/fluent/tests/test_fluent_version.py +1 -1
- ansys/fluent/tests/test_launcher.py +22 -5
- ansys/fluent/tests/test_launcher_remote.py +80 -4
- ansys/fluent/tests/test_meshing_utilities.py +93 -44
- ansys/fluent/tests/test_meshing_workflow.py +6 -6
- ansys/fluent/tests/test_meshingmode/test_meshing_launch.py +1 -1
- ansys/fluent/tests/test_new_meshing_workflow.py +42 -3
- ansys/fluent/tests/test_preferences.py +6 -6
- ansys/fluent/tests/test_reduction.py +61 -30
- ansys/fluent/tests/test_rp_vars.py +1 -1
- ansys/fluent/tests/test_search.py +53 -200
- ansys/fluent/tests/test_session.py +18 -13
- ansys/fluent/tests/test_settings_api.py +93 -29
- ansys/fluent/tests/test_settings_reader.py +1 -1
- ansys/fluent/tests/test_solver_monitors.py +1 -1
- ansys/fluent/tests/test_solvermode/test_calculationactivities.py +4 -4
- ansys/fluent/tests/test_solvermode/test_controls.py +3 -3
- ansys/fluent/tests/test_solvermode/test_methods.py +1 -1
- ansys/fluent/tests/test_solvermode/test_models.py +3 -3
- ansys/fluent/tests/test_systemcoupling.py +33 -5
- ansys/fluent/tests/test_topy.py +2 -2
- ansys/fluent/tests/test_tui_api.py +5 -5
- ansys/fluent/tests/test_utils.py +1 -1
- {ansys_fluent_core-0.27.dev1.dist-info → ansys_fluent_core-0.28.dev0.dist-info}/METADATA +6 -17
- ansys_fluent_core-0.28.dev0.dist-info/RECORD +291 -0
- ansys/fluent/core/generated/api_tree_222.pickle +0 -0
- ansys/fluent/core/generated/api_tree_231.pickle +0 -0
- ansys/fluent/core/generated/api_tree_232.pickle +0 -0
- ansys/fluent/core/generated/api_tree_241.pickle +0 -0
- ansys/fluent/core/generated/api_tree_242.pickle +0 -0
- ansys/fluent/core/generated/api_tree_251.pickle +0 -0
- ansys/fluent/tests/test_tests_util.py +0 -47
- ansys/fluent/tests/util/__init__.py +0 -38
- ansys_fluent_core-0.27.dev1.dist-info/RECORD +0 -283
- {ansys_fluent_core-0.27.dev1.dist-info → ansys_fluent_core-0.28.dev0.dist-info}/AUTHORS +0 -0
- {ansys_fluent_core-0.27.dev1.dist-info → ansys_fluent_core-0.28.dev0.dist-info}/LICENSE +0 -0
- {ansys_fluent_core-0.27.dev1.dist-info → ansys_fluent_core-0.28.dev0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,691 @@
|
|
|
1
|
+
"""Deprecated wrappers over FieldData gRPC service of Fluent."""
|
|
2
|
+
|
|
3
|
+
from typing import Callable, Dict, List
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
from ansys.api.fluent.v0 import field_data_pb2 as FieldDataProtoModule
|
|
7
|
+
from ansys.fluent.core.services.field_data import (
|
|
8
|
+
ChunkParser,
|
|
9
|
+
FieldDataService,
|
|
10
|
+
FieldInfo,
|
|
11
|
+
FieldTransaction,
|
|
12
|
+
SurfaceDataType,
|
|
13
|
+
_AllowedScalarFieldNames,
|
|
14
|
+
_AllowedSurfaceIDs,
|
|
15
|
+
_AllowedSurfaceNames,
|
|
16
|
+
_AllowedVectorFieldNames,
|
|
17
|
+
_FieldMethod,
|
|
18
|
+
_get_surface_ids,
|
|
19
|
+
get_fields_request,
|
|
20
|
+
override_help_text,
|
|
21
|
+
)
|
|
22
|
+
from ansys.fluent.core.utils.deprecate import deprecate_argument
|
|
23
|
+
from ansys.fluent.core.warnings import PyFluentDeprecationWarning
|
|
24
|
+
|
|
25
|
+
DEPRECATION_MSG = "'field_data_old' is deprecated. Use 'field_data' instead."
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class BaseFieldData:
|
|
29
|
+
"""Contains common properties required by all field data types."""
|
|
30
|
+
|
|
31
|
+
def __init__(self, i_d, data):
|
|
32
|
+
"""__init__ method of BaseFieldData class."""
|
|
33
|
+
self._data = data
|
|
34
|
+
self._id = i_d
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def data(self):
|
|
38
|
+
"""Returns data."""
|
|
39
|
+
return self._data
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def surface_id(self):
|
|
43
|
+
"""Returns surface ID."""
|
|
44
|
+
return self._id
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def size(self):
|
|
48
|
+
"""Returns size of data."""
|
|
49
|
+
return len(self._data)
|
|
50
|
+
|
|
51
|
+
def __getitem__(self, item):
|
|
52
|
+
return self._data[item]
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class ScalarFieldData(BaseFieldData):
|
|
56
|
+
"""Contains scalar field data."""
|
|
57
|
+
|
|
58
|
+
class ScalarData:
|
|
59
|
+
"""Stores and provides the data as a scalar."""
|
|
60
|
+
|
|
61
|
+
def __init__(self, data):
|
|
62
|
+
"""__init__ method of ScalarData class."""
|
|
63
|
+
self.scalar_data = data
|
|
64
|
+
|
|
65
|
+
def __init__(self, i_d, data):
|
|
66
|
+
"""__init__ method of ScalarFieldData class."""
|
|
67
|
+
super().__init__(i_d, [ScalarFieldData.ScalarData(_data) for _data in data])
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class Vector:
|
|
71
|
+
"""Stores the data as a vector ``(x, y, z)``."""
|
|
72
|
+
|
|
73
|
+
def __init__(self, x, y, z):
|
|
74
|
+
"""__init__ method of Vector class."""
|
|
75
|
+
self._x = x
|
|
76
|
+
self._y = y
|
|
77
|
+
self._z = z
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def x(self) -> float:
|
|
81
|
+
"""Returns vector point x."""
|
|
82
|
+
return self._x
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def y(self) -> float:
|
|
86
|
+
"""Returns vector point y."""
|
|
87
|
+
return self._y
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def z(self) -> float:
|
|
91
|
+
"""Returns vector point z."""
|
|
92
|
+
return self._z
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def _resolve_into_array_of_vectors(data):
|
|
96
|
+
if data.size % 3:
|
|
97
|
+
raise ValueError(
|
|
98
|
+
"Dataset must be resolved as a set of vectors."
|
|
99
|
+
"The length of the dataset should always be in multiples of 3."
|
|
100
|
+
)
|
|
101
|
+
data.shape = data.size // 3, 3
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class VectorFieldData(BaseFieldData):
|
|
105
|
+
"""Provides a container for vector field data."""
|
|
106
|
+
|
|
107
|
+
class VectorData(Vector):
|
|
108
|
+
"""Stores and provides the data as a vector."""
|
|
109
|
+
|
|
110
|
+
def __init__(self, x, y, z):
|
|
111
|
+
"""__init__ method of VectorData class."""
|
|
112
|
+
super().__init__(x, y, z)
|
|
113
|
+
|
|
114
|
+
def __init__(self, i_d, data, scale):
|
|
115
|
+
"""__init__ method of VectorFieldData class."""
|
|
116
|
+
_resolve_into_array_of_vectors(data)
|
|
117
|
+
self._scale = scale
|
|
118
|
+
super().__init__(i_d, [VectorFieldData.VectorData(x, y, z) for x, y, z in data])
|
|
119
|
+
|
|
120
|
+
@property
|
|
121
|
+
def scale(self) -> float:
|
|
122
|
+
"""Returns scale of the vector field."""
|
|
123
|
+
return self._scale
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
class Vertices(BaseFieldData):
|
|
127
|
+
"""Provides a container for the vertex data."""
|
|
128
|
+
|
|
129
|
+
class Vertex(Vector):
|
|
130
|
+
"""Stores and provides the data as a vector of a vertex."""
|
|
131
|
+
|
|
132
|
+
def __init__(self, x, y, z):
|
|
133
|
+
"""__init__ method of Vertex class."""
|
|
134
|
+
super().__init__(x, y, z)
|
|
135
|
+
|
|
136
|
+
def __init__(self, i_d, data):
|
|
137
|
+
"""__init__ method of Vertices class."""
|
|
138
|
+
_resolve_into_array_of_vectors(data)
|
|
139
|
+
super().__init__(i_d, [(Vertices.Vertex(x, y, z)) for x, y, z in data])
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
class FacesCentroid(BaseFieldData):
|
|
143
|
+
"""Provides the container for the face centroid data."""
|
|
144
|
+
|
|
145
|
+
class Centroid(Vector):
|
|
146
|
+
"""Stores and provides the face centroid data as a vector."""
|
|
147
|
+
|
|
148
|
+
def __init__(self, x, y, z):
|
|
149
|
+
"""__init__ method of Centroid class."""
|
|
150
|
+
super().__init__(x, y, z)
|
|
151
|
+
|
|
152
|
+
def __init__(self, i_d, data):
|
|
153
|
+
"""__init__ method of FacesCentroid class."""
|
|
154
|
+
_resolve_into_array_of_vectors(data)
|
|
155
|
+
super().__init__(i_d, [(FacesCentroid.Centroid(x, y, z)) for x, y, z in data])
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
class FacesConnectivity(BaseFieldData):
|
|
159
|
+
"""Provides the container for the face connectivity data."""
|
|
160
|
+
|
|
161
|
+
class Faces:
|
|
162
|
+
"""Stores and provides the face connectivity data as an array."""
|
|
163
|
+
|
|
164
|
+
def __init__(self, node_count, node_indices):
|
|
165
|
+
"""__init__ method of Faces class."""
|
|
166
|
+
self.node_count = node_count
|
|
167
|
+
self.node_indices = node_indices
|
|
168
|
+
|
|
169
|
+
def __init__(self, i_d, data):
|
|
170
|
+
"""__init__ method of FacesConnectivity class."""
|
|
171
|
+
faces_data = []
|
|
172
|
+
i = 0
|
|
173
|
+
|
|
174
|
+
while i < len(data):
|
|
175
|
+
end = i + 1 + data[i]
|
|
176
|
+
faces_data.append(FacesConnectivity.Faces(data[i], data[i + 1 : end]))
|
|
177
|
+
i = end
|
|
178
|
+
|
|
179
|
+
super().__init__(i_d, faces_data)
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
class FacesNormal(BaseFieldData):
|
|
183
|
+
"""Provides the container for the face normal data."""
|
|
184
|
+
|
|
185
|
+
class Normal(Vector):
|
|
186
|
+
"""Stores and provides the face normal data as a vector."""
|
|
187
|
+
|
|
188
|
+
def __init__(self, x, y, z):
|
|
189
|
+
"""__init__ method of Normal class."""
|
|
190
|
+
super().__init__(x, y, z)
|
|
191
|
+
|
|
192
|
+
def __init__(self, i_d, data):
|
|
193
|
+
"""__init__ method of FacesNormal class."""
|
|
194
|
+
_resolve_into_array_of_vectors(data)
|
|
195
|
+
super().__init__(i_d, [FacesNormal.Normal(x, y, z) for x, y, z in data])
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
class DeprecatedFieldData:
|
|
199
|
+
"""Provides access to Fluent field data on surfaces."""
|
|
200
|
+
|
|
201
|
+
def __init__(
|
|
202
|
+
self,
|
|
203
|
+
service: FieldDataService,
|
|
204
|
+
field_info: FieldInfo,
|
|
205
|
+
is_data_valid: Callable[[], bool],
|
|
206
|
+
scheme_eval=None,
|
|
207
|
+
):
|
|
208
|
+
"""__init__ method of FieldData class."""
|
|
209
|
+
self._service = service
|
|
210
|
+
self._field_info = field_info
|
|
211
|
+
self.is_data_valid = is_data_valid
|
|
212
|
+
self.scheme_eval = scheme_eval
|
|
213
|
+
|
|
214
|
+
self._allowed_surface_names = _AllowedSurfaceNames(field_info)
|
|
215
|
+
|
|
216
|
+
self._allowed_surface_ids = _AllowedSurfaceIDs(field_info)
|
|
217
|
+
|
|
218
|
+
self._allowed_scalar_field_names = _AllowedScalarFieldNames(
|
|
219
|
+
is_data_valid, field_info
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
self._allowed_vector_field_names = _AllowedVectorFieldNames(
|
|
223
|
+
is_data_valid, field_info
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
surface_args = dict(
|
|
227
|
+
surface_ids=self._allowed_surface_ids,
|
|
228
|
+
surface_name=self._allowed_surface_names,
|
|
229
|
+
)
|
|
230
|
+
scalar_field_args = {
|
|
231
|
+
**dict(field_name=self._allowed_scalar_field_names),
|
|
232
|
+
**surface_args,
|
|
233
|
+
}
|
|
234
|
+
self.get_scalar_field_data = override_help_text(
|
|
235
|
+
_FieldMethod(
|
|
236
|
+
field_data_accessor=self.get_scalar_field_data,
|
|
237
|
+
args_allowed_values_accessors=scalar_field_args,
|
|
238
|
+
),
|
|
239
|
+
self.get_scalar_field_data,
|
|
240
|
+
)
|
|
241
|
+
self.get_vector_field_data = override_help_text(
|
|
242
|
+
_FieldMethod(
|
|
243
|
+
field_data_accessor=self.get_vector_field_data,
|
|
244
|
+
args_allowed_values_accessors={
|
|
245
|
+
**dict(field_name=self._allowed_vector_field_names),
|
|
246
|
+
**surface_args,
|
|
247
|
+
},
|
|
248
|
+
),
|
|
249
|
+
self.get_vector_field_data,
|
|
250
|
+
)
|
|
251
|
+
self.get_surface_data = override_help_text(
|
|
252
|
+
_FieldMethod(
|
|
253
|
+
field_data_accessor=self.get_surface_data,
|
|
254
|
+
args_allowed_values_accessors=surface_args,
|
|
255
|
+
),
|
|
256
|
+
self.get_surface_data,
|
|
257
|
+
)
|
|
258
|
+
self.get_pathlines_field_data = override_help_text(
|
|
259
|
+
_FieldMethod(
|
|
260
|
+
field_data_accessor=self.get_pathlines_field_data,
|
|
261
|
+
args_allowed_values_accessors=scalar_field_args,
|
|
262
|
+
),
|
|
263
|
+
self.get_pathlines_field_data,
|
|
264
|
+
)
|
|
265
|
+
|
|
266
|
+
def new_transaction(self):
|
|
267
|
+
"""Create a new field transaction."""
|
|
268
|
+
warnings.warn(DEPRECATION_MSG, PyFluentDeprecationWarning)
|
|
269
|
+
return FieldTransaction(
|
|
270
|
+
self._service,
|
|
271
|
+
self._field_info,
|
|
272
|
+
self._allowed_surface_ids,
|
|
273
|
+
self._allowed_surface_names,
|
|
274
|
+
self._allowed_scalar_field_names,
|
|
275
|
+
self._allowed_vector_field_names,
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
@deprecate_argument(
|
|
279
|
+
old_arg="surface_name",
|
|
280
|
+
new_arg="surfaces",
|
|
281
|
+
converter=lambda old_arg_val: [old_arg_val] if old_arg_val else [],
|
|
282
|
+
)
|
|
283
|
+
@deprecate_argument(
|
|
284
|
+
old_arg="surface_ids",
|
|
285
|
+
new_arg="surfaces",
|
|
286
|
+
converter=lambda old_arg_val: old_arg_val or [],
|
|
287
|
+
)
|
|
288
|
+
def get_scalar_field_data(
|
|
289
|
+
self,
|
|
290
|
+
field_name: str,
|
|
291
|
+
surfaces: List[int | str],
|
|
292
|
+
node_value: bool | None = True,
|
|
293
|
+
boundary_value: bool | None = True,
|
|
294
|
+
) -> ScalarFieldData | Dict[int, ScalarFieldData]:
|
|
295
|
+
"""Get scalar field data on a surface.
|
|
296
|
+
|
|
297
|
+
Parameters
|
|
298
|
+
----------
|
|
299
|
+
field_name : str
|
|
300
|
+
Name of the scalar field.
|
|
301
|
+
surfaces : List[int | str]
|
|
302
|
+
List of surface IDS or surface names for the surface data.
|
|
303
|
+
node_value : bool, optional
|
|
304
|
+
Whether to provide data for the nodal location. The default is ``True``.
|
|
305
|
+
When ``False``, data is provided for the element location.
|
|
306
|
+
boundary_value : bool, optional
|
|
307
|
+
Whether to provide slip velocity at the wall boundaries. The default is
|
|
308
|
+
``True``. When ``True``, no slip velocity is provided.
|
|
309
|
+
|
|
310
|
+
Returns
|
|
311
|
+
-------
|
|
312
|
+
ScalarFieldData | Dict[int, ScalarFieldData]
|
|
313
|
+
If a surface name is provided as input, scalar field data is returned. If surface
|
|
314
|
+
IDs are provided as input, a dictionary containing a map of surface IDs to scalar
|
|
315
|
+
field data.
|
|
316
|
+
"""
|
|
317
|
+
warnings.warn(DEPRECATION_MSG, PyFluentDeprecationWarning)
|
|
318
|
+
surface_ids = _get_surface_ids(
|
|
319
|
+
field_info=self._field_info,
|
|
320
|
+
allowed_surface_names=self._allowed_surface_names,
|
|
321
|
+
surfaces=surfaces,
|
|
322
|
+
)
|
|
323
|
+
fields_request = get_fields_request()
|
|
324
|
+
fields_request.scalarFieldRequest.extend(
|
|
325
|
+
[
|
|
326
|
+
FieldDataProtoModule.ScalarFieldRequest(
|
|
327
|
+
surfaceId=surface_id,
|
|
328
|
+
scalarFieldName=self._allowed_scalar_field_names.valid_name(
|
|
329
|
+
field_name
|
|
330
|
+
),
|
|
331
|
+
dataLocation=(
|
|
332
|
+
FieldDataProtoModule.DataLocation.Nodes
|
|
333
|
+
if node_value
|
|
334
|
+
else FieldDataProtoModule.DataLocation.Elements
|
|
335
|
+
),
|
|
336
|
+
provideBoundaryValues=boundary_value,
|
|
337
|
+
)
|
|
338
|
+
for surface_id in surface_ids
|
|
339
|
+
]
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
fields = ChunkParser().extract_fields(self._service.get_fields(fields_request))
|
|
343
|
+
scalar_field_data = next(iter(fields.values()))
|
|
344
|
+
|
|
345
|
+
if len(surfaces) == 1 and isinstance(surfaces[0], str):
|
|
346
|
+
return ScalarFieldData(
|
|
347
|
+
surface_ids[0], scalar_field_data[surface_ids[0]][field_name]
|
|
348
|
+
)
|
|
349
|
+
else:
|
|
350
|
+
return {
|
|
351
|
+
surface_id: ScalarFieldData(
|
|
352
|
+
surface_id, scalar_field_data[surface_id][field_name]
|
|
353
|
+
)
|
|
354
|
+
for surface_id in surface_ids
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
@deprecate_argument(
|
|
358
|
+
old_arg="surface_name",
|
|
359
|
+
new_arg="surfaces",
|
|
360
|
+
converter=lambda old_arg_val: [old_arg_val] if old_arg_val else [],
|
|
361
|
+
)
|
|
362
|
+
@deprecate_argument(
|
|
363
|
+
old_arg="surface_ids",
|
|
364
|
+
new_arg="surfaces",
|
|
365
|
+
converter=lambda old_arg_val: old_arg_val or [],
|
|
366
|
+
)
|
|
367
|
+
@deprecate_argument(
|
|
368
|
+
old_arg="data_type",
|
|
369
|
+
new_arg="data_types",
|
|
370
|
+
converter=lambda old_arg_val: [old_arg_val] if old_arg_val else [],
|
|
371
|
+
)
|
|
372
|
+
def get_surface_data(
|
|
373
|
+
self,
|
|
374
|
+
data_types: List[SurfaceDataType] | List[str],
|
|
375
|
+
surfaces: List[int | str],
|
|
376
|
+
overset_mesh: bool | None = False,
|
|
377
|
+
) -> (
|
|
378
|
+
Vertices
|
|
379
|
+
| FacesConnectivity
|
|
380
|
+
| FacesNormal
|
|
381
|
+
| FacesCentroid
|
|
382
|
+
| Dict[int, Vertices | FacesConnectivity | FacesNormal | FacesCentroid]
|
|
383
|
+
):
|
|
384
|
+
"""Get surface data (vertices, faces connectivity, centroids, and normals).
|
|
385
|
+
|
|
386
|
+
Parameters
|
|
387
|
+
----------
|
|
388
|
+
data_types : List[SurfaceDataType] | List[str],
|
|
389
|
+
SurfaceDataType Enum members.
|
|
390
|
+
surfaces : List[int | str]
|
|
391
|
+
List of surface IDS or surface names for the surface data.
|
|
392
|
+
overset_mesh : bool, optional
|
|
393
|
+
Whether to provide the overset method. The default is ``False``.
|
|
394
|
+
|
|
395
|
+
Returns
|
|
396
|
+
-------
|
|
397
|
+
Vertices, FacesConnectivity, FacesNormal, FacesCentroid | Dict[int, Vertices | FacesConnectivity | FacesNormal | FacesCentroid]
|
|
398
|
+
If a surface name is provided as input, face vertices, connectivity data, and normal or centroid data are returned.
|
|
399
|
+
If surface IDs are provided as input, a dictionary containing a map of surface IDs to face
|
|
400
|
+
vertices, connectivity data, and normal or centroid data is returned.
|
|
401
|
+
"""
|
|
402
|
+
warnings.warn(DEPRECATION_MSG, PyFluentDeprecationWarning)
|
|
403
|
+
surface_ids = _get_surface_ids(
|
|
404
|
+
field_info=self._field_info,
|
|
405
|
+
allowed_surface_names=self._allowed_surface_names,
|
|
406
|
+
surfaces=surfaces,
|
|
407
|
+
)
|
|
408
|
+
updated_data = []
|
|
409
|
+
for d_type in data_types:
|
|
410
|
+
if isinstance(d_type, str):
|
|
411
|
+
updated_data.append(SurfaceDataType(d_type))
|
|
412
|
+
else:
|
|
413
|
+
updated_data.append(d_type)
|
|
414
|
+
data_types = updated_data
|
|
415
|
+
fields_request = get_fields_request()
|
|
416
|
+
fields_request.surfaceRequest.extend(
|
|
417
|
+
[
|
|
418
|
+
FieldDataProtoModule.SurfaceRequest(
|
|
419
|
+
surfaceId=surface_id,
|
|
420
|
+
oversetMesh=overset_mesh,
|
|
421
|
+
provideFaces=SurfaceDataType.FacesConnectivity in data_types,
|
|
422
|
+
provideVertices=SurfaceDataType.Vertices in data_types,
|
|
423
|
+
provideFacesCentroid=SurfaceDataType.FacesCentroid in data_types,
|
|
424
|
+
provideFacesNormal=SurfaceDataType.FacesNormal in data_types,
|
|
425
|
+
)
|
|
426
|
+
for surface_id in surface_ids
|
|
427
|
+
]
|
|
428
|
+
)
|
|
429
|
+
fields = ChunkParser().extract_fields(self._service.get_fields(fields_request))
|
|
430
|
+
surface_data = next(iter(fields.values()))
|
|
431
|
+
|
|
432
|
+
def _get_surfaces_data(parent_class, surf_id, _data_type):
|
|
433
|
+
return parent_class(
|
|
434
|
+
surf_id,
|
|
435
|
+
surface_data[surf_id][SurfaceDataType(_data_type).value],
|
|
436
|
+
)
|
|
437
|
+
|
|
438
|
+
if SurfaceDataType.Vertices in data_types:
|
|
439
|
+
if len(surfaces) == 1 and isinstance(surfaces[0], str):
|
|
440
|
+
return _get_surfaces_data(
|
|
441
|
+
Vertices, surface_ids[0], SurfaceDataType.Vertices
|
|
442
|
+
)
|
|
443
|
+
else:
|
|
444
|
+
return {
|
|
445
|
+
surface_id: _get_surfaces_data(
|
|
446
|
+
Vertices, surface_id, SurfaceDataType.Vertices
|
|
447
|
+
)
|
|
448
|
+
for surface_id in surface_ids
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
if SurfaceDataType.FacesCentroid in data_types:
|
|
452
|
+
if len(surfaces) == 1 and isinstance(surfaces[0], str):
|
|
453
|
+
return _get_surfaces_data(
|
|
454
|
+
FacesCentroid, surface_ids[0], SurfaceDataType.FacesCentroid
|
|
455
|
+
)
|
|
456
|
+
else:
|
|
457
|
+
return {
|
|
458
|
+
surface_id: _get_surfaces_data(
|
|
459
|
+
FacesCentroid, surface_id, SurfaceDataType.FacesCentroid
|
|
460
|
+
)
|
|
461
|
+
for surface_id in surface_ids
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
if SurfaceDataType.FacesConnectivity in data_types:
|
|
465
|
+
if len(surfaces) == 1 and isinstance(surfaces[0], str):
|
|
466
|
+
return _get_surfaces_data(
|
|
467
|
+
FacesConnectivity, surface_ids[0], SurfaceDataType.FacesConnectivity
|
|
468
|
+
)
|
|
469
|
+
else:
|
|
470
|
+
return {
|
|
471
|
+
surface_id: _get_surfaces_data(
|
|
472
|
+
FacesConnectivity, surface_id, SurfaceDataType.FacesConnectivity
|
|
473
|
+
)
|
|
474
|
+
for surface_id in surface_ids
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
if SurfaceDataType.FacesNormal in data_types:
|
|
478
|
+
if len(surfaces) == 1 and isinstance(surfaces[0], str):
|
|
479
|
+
return _get_surfaces_data(
|
|
480
|
+
FacesNormal, surface_ids[0], SurfaceDataType.FacesNormal
|
|
481
|
+
)
|
|
482
|
+
else:
|
|
483
|
+
return {
|
|
484
|
+
surface_id: _get_surfaces_data(
|
|
485
|
+
FacesNormal, surface_id, SurfaceDataType.FacesNormal
|
|
486
|
+
)
|
|
487
|
+
for surface_id in surface_ids
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
@deprecate_argument(
|
|
491
|
+
old_arg="surface_name",
|
|
492
|
+
new_arg="surfaces",
|
|
493
|
+
converter=lambda old_arg_val: [old_arg_val] if old_arg_val else [],
|
|
494
|
+
)
|
|
495
|
+
@deprecate_argument(
|
|
496
|
+
old_arg="surface_ids",
|
|
497
|
+
new_arg="surfaces",
|
|
498
|
+
converter=lambda old_arg_val: old_arg_val or [],
|
|
499
|
+
)
|
|
500
|
+
def get_vector_field_data(
|
|
501
|
+
self,
|
|
502
|
+
field_name: str,
|
|
503
|
+
surfaces: List[int | str],
|
|
504
|
+
) -> VectorFieldData | Dict[int, VectorFieldData]:
|
|
505
|
+
"""Get vector field data on a surface.
|
|
506
|
+
|
|
507
|
+
Parameters
|
|
508
|
+
----------
|
|
509
|
+
field_name : str
|
|
510
|
+
Name of the vector field.
|
|
511
|
+
surfaces : List[int | str]
|
|
512
|
+
List of surface IDS or surface names for the surface data.
|
|
513
|
+
|
|
514
|
+
Returns
|
|
515
|
+
-------
|
|
516
|
+
VectorFieldData | Dict[int, VectorFieldData]
|
|
517
|
+
If a surface name is provided as input, vector field data is returned.
|
|
518
|
+
If surface IDs are provided as input, a dictionary containing a map of
|
|
519
|
+
surface IDs to vector field data is returned.
|
|
520
|
+
"""
|
|
521
|
+
warnings.warn(DEPRECATION_MSG, PyFluentDeprecationWarning)
|
|
522
|
+
surface_ids = _get_surface_ids(
|
|
523
|
+
field_info=self._field_info,
|
|
524
|
+
allowed_surface_names=self._allowed_surface_names,
|
|
525
|
+
surfaces=surfaces,
|
|
526
|
+
)
|
|
527
|
+
for surface_id in surface_ids:
|
|
528
|
+
self.scheme_eval.string_eval(f"(surface? {surface_id})")
|
|
529
|
+
fields_request = get_fields_request()
|
|
530
|
+
fields_request.vectorFieldRequest.extend(
|
|
531
|
+
[
|
|
532
|
+
FieldDataProtoModule.VectorFieldRequest(
|
|
533
|
+
surfaceId=surface_id,
|
|
534
|
+
vectorFieldName=self._allowed_vector_field_names.valid_name(
|
|
535
|
+
field_name
|
|
536
|
+
),
|
|
537
|
+
)
|
|
538
|
+
for surface_id in surface_ids
|
|
539
|
+
]
|
|
540
|
+
)
|
|
541
|
+
fields = ChunkParser().extract_fields(self._service.get_fields(fields_request))
|
|
542
|
+
vector_field_data = next(iter(fields.values()))
|
|
543
|
+
|
|
544
|
+
if len(surfaces) == 1 and isinstance(surfaces[0], str):
|
|
545
|
+
return VectorFieldData(
|
|
546
|
+
surface_ids[0],
|
|
547
|
+
vector_field_data[surface_ids[0]][field_name],
|
|
548
|
+
vector_field_data[surface_ids[0]]["vector-scale"][0],
|
|
549
|
+
)
|
|
550
|
+
else:
|
|
551
|
+
return {
|
|
552
|
+
surface_id: VectorFieldData(
|
|
553
|
+
surface_id,
|
|
554
|
+
vector_field_data[surface_id][field_name],
|
|
555
|
+
vector_field_data[surface_id]["vector-scale"][0],
|
|
556
|
+
)
|
|
557
|
+
for surface_id in surface_ids
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
@deprecate_argument(
|
|
561
|
+
old_arg="surface_name",
|
|
562
|
+
new_arg="surfaces",
|
|
563
|
+
converter=lambda old_arg_val: [old_arg_val] if old_arg_val else [],
|
|
564
|
+
)
|
|
565
|
+
@deprecate_argument(
|
|
566
|
+
old_arg="surface_ids",
|
|
567
|
+
new_arg="surfaces",
|
|
568
|
+
converter=lambda old_arg_val: old_arg_val or [],
|
|
569
|
+
)
|
|
570
|
+
def get_pathlines_field_data(
|
|
571
|
+
self,
|
|
572
|
+
field_name: str,
|
|
573
|
+
surfaces: List[int | str],
|
|
574
|
+
additional_field_name: str | None = "",
|
|
575
|
+
provide_particle_time_field: bool | None = False,
|
|
576
|
+
node_value: bool | None = True,
|
|
577
|
+
steps: int | None = 500,
|
|
578
|
+
step_size: float | None = 500,
|
|
579
|
+
skip: int | None = 0,
|
|
580
|
+
reverse: bool | None = False,
|
|
581
|
+
accuracy_control_on: bool | None = False,
|
|
582
|
+
tolerance: float | None = 0.001,
|
|
583
|
+
coarsen: int | None = 1,
|
|
584
|
+
velocity_domain: str | None = "all-phases",
|
|
585
|
+
zones: list | None = None,
|
|
586
|
+
) -> Dict:
|
|
587
|
+
"""Get the pathlines field data on a surface.
|
|
588
|
+
|
|
589
|
+
Parameters
|
|
590
|
+
----------
|
|
591
|
+
field_name : str
|
|
592
|
+
Name of the scalar field to color pathlines.
|
|
593
|
+
surfaces : List[int | str]
|
|
594
|
+
List of surface IDS or surface names for the surface data.
|
|
595
|
+
additional_field_name : str, optional
|
|
596
|
+
Additional field if required.
|
|
597
|
+
provide_particle_time_field: bool, optional
|
|
598
|
+
Whether to provide the particle time. The default is ``False``.
|
|
599
|
+
node_value : bool, optional
|
|
600
|
+
Whether to provide the nodal values. The default is ``True``. If
|
|
601
|
+
``False``, element values are provided.
|
|
602
|
+
steps: int, optional
|
|
603
|
+
Pathlines steps. The default is ``500``
|
|
604
|
+
step_size: float, optional
|
|
605
|
+
Pathlines step size. The default is ``0.01``.
|
|
606
|
+
skip: int, optional
|
|
607
|
+
Pathlines to skip. The default is ``0``.
|
|
608
|
+
reverse: bool, optional
|
|
609
|
+
Whether to draw pathlines in reverse direction. The default is ``False``.
|
|
610
|
+
accuracy_control_on: bool, optional
|
|
611
|
+
Whether to control accuracy. The default is ``False``.
|
|
612
|
+
tolerance: float, optional
|
|
613
|
+
Pathlines tolerance. The default is ``0.001``.
|
|
614
|
+
coarsen: int, optional
|
|
615
|
+
Pathlines coarsen. The default is ``1``.
|
|
616
|
+
velocity_domain: str, optional
|
|
617
|
+
Domain for pathlines. The default is ``"all-phases"``.
|
|
618
|
+
zones: list, optional
|
|
619
|
+
Zones for pathlines. The default is ``[]``.
|
|
620
|
+
|
|
621
|
+
Returns
|
|
622
|
+
-------
|
|
623
|
+
Dict
|
|
624
|
+
Dictionary containing a map of surface IDs to the pathline data.
|
|
625
|
+
For example, pathlines connectivity, vertices, and field.
|
|
626
|
+
"""
|
|
627
|
+
if zones is None:
|
|
628
|
+
zones = []
|
|
629
|
+
warnings.warn(DEPRECATION_MSG, PyFluentDeprecationWarning)
|
|
630
|
+
surface_ids = _get_surface_ids(
|
|
631
|
+
field_info=self._field_info,
|
|
632
|
+
allowed_surface_names=self._allowed_surface_names,
|
|
633
|
+
surfaces=surfaces,
|
|
634
|
+
)
|
|
635
|
+
fields_request = get_fields_request()
|
|
636
|
+
fields_request.pathlinesFieldRequest.extend(
|
|
637
|
+
[
|
|
638
|
+
FieldDataProtoModule.PathlinesFieldRequest(
|
|
639
|
+
surfaceId=surface_id,
|
|
640
|
+
field=field_name,
|
|
641
|
+
additionalField=additional_field_name,
|
|
642
|
+
provideParticleTimeField=provide_particle_time_field,
|
|
643
|
+
dataLocation=(
|
|
644
|
+
FieldDataProtoModule.DataLocation.Nodes
|
|
645
|
+
if node_value
|
|
646
|
+
else FieldDataProtoModule.DataLocation.Elements
|
|
647
|
+
),
|
|
648
|
+
steps=steps,
|
|
649
|
+
stepSize=step_size,
|
|
650
|
+
skip=skip,
|
|
651
|
+
reverse=reverse,
|
|
652
|
+
accuracyControlOn=accuracy_control_on,
|
|
653
|
+
tolerance=tolerance,
|
|
654
|
+
coarsen=coarsen,
|
|
655
|
+
velocityDomain=velocity_domain,
|
|
656
|
+
zones=zones,
|
|
657
|
+
)
|
|
658
|
+
for surface_id in surface_ids
|
|
659
|
+
]
|
|
660
|
+
)
|
|
661
|
+
fields = ChunkParser().extract_fields(self._service.get_fields(fields_request))
|
|
662
|
+
pathlines_data = next(iter(fields.values()))
|
|
663
|
+
|
|
664
|
+
def _get_surfaces_data(parent_class, surf_id, _data_type):
|
|
665
|
+
return parent_class(
|
|
666
|
+
surf_id,
|
|
667
|
+
pathlines_data[surf_id][_data_type],
|
|
668
|
+
)
|
|
669
|
+
|
|
670
|
+
if len(surfaces) == 1 and isinstance(surfaces[0], str):
|
|
671
|
+
vertices_data = _get_surfaces_data(Vertices, surface_ids[0], "vertices")
|
|
672
|
+
lines_data = _get_surfaces_data(FacesConnectivity, surface_ids[0], "lines")
|
|
673
|
+
field_data = ScalarFieldData(
|
|
674
|
+
surface_ids[0], pathlines_data[surface_ids[0]][field_name]
|
|
675
|
+
)
|
|
676
|
+
return {
|
|
677
|
+
"vertices": vertices_data,
|
|
678
|
+
"lines": lines_data,
|
|
679
|
+
field_name: field_data,
|
|
680
|
+
}
|
|
681
|
+
else:
|
|
682
|
+
path_lines_dict = {}
|
|
683
|
+
for surface_id in surface_ids:
|
|
684
|
+
path_lines_dict[surface_id] = {
|
|
685
|
+
"vertices": _get_surfaces_data(Vertices, surface_id, "vertices"),
|
|
686
|
+
"lines": _get_surfaces_data(FacesConnectivity, surface_id, "lines"),
|
|
687
|
+
field_name: ScalarFieldData(
|
|
688
|
+
surface_id, pathlines_data[surface_id][field_name]
|
|
689
|
+
),
|
|
690
|
+
}
|
|
691
|
+
return path_lines_dict
|