ansys-fluent-core 0.32.2__py3-none-any.whl → 0.33.0__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 +11 -4
- ansys/fluent/core/codegen/builtin_settingsgen.py +16 -8
- ansys/fluent/core/codegen/datamodelgen.py +2 -2
- ansys/fluent/core/codegen/print_fluent_version.py +4 -4
- ansys/fluent/core/codegen/settingsgen.py +1 -2
- ansys/fluent/core/exceptions.py +0 -1
- ansys/fluent/core/file_session.py +9 -9
- ansys/fluent/core/filereader/case_file.py +2 -2
- ansys/fluent/core/fluent_connection.py +5 -5
- ansys/fluent/core/generated/api_tree/api_objects.json +1 -1
- ansys/fluent/core/generated/datamodel_231/flicing.py +55 -55
- ansys/fluent/core/generated/datamodel_231/meshing.py +171 -171
- ansys/fluent/core/generated/datamodel_232/flicing.py +30 -30
- ansys/fluent/core/generated/datamodel_232/meshing.py +218 -218
- ansys/fluent/core/generated/datamodel_241/flicing.py +45 -45
- ansys/fluent/core/generated/datamodel_241/meshing.py +295 -295
- ansys/fluent/core/generated/datamodel_242/flicing.py +40 -40
- ansys/fluent/core/generated/datamodel_242/meshing.py +299 -299
- ansys/fluent/core/generated/datamodel_242/part_management.py +3 -3
- ansys/fluent/core/generated/datamodel_251/flicing.py +45 -45
- ansys/fluent/core/generated/datamodel_251/meshing.py +294 -294
- ansys/fluent/core/generated/datamodel_251/part_management.py +6 -6
- ansys/fluent/core/generated/datamodel_252/flicing.py +50 -50
- ansys/fluent/core/generated/datamodel_252/meshing.py +431 -431
- ansys/fluent/core/generated/datamodel_252/part_management.py +5 -5
- ansys/fluent/core/generated/datamodel_261/flicing.py +55 -55
- ansys/fluent/core/generated/datamodel_261/meshing.py +447 -441
- ansys/fluent/core/generated/datamodel_261/part_management.py +5 -5
- ansys/fluent/core/generated/datamodel_261/solver_workflow.py +7 -0
- ansys/fluent/core/generated/fluent_version_261.py +3 -3
- ansys/fluent/core/generated/solver/settings_252.py +55 -55
- ansys/fluent/core/generated/solver/settings_261.py +2134 -3644
- ansys/fluent/core/generated/solver/settings_261.pyi +3391 -6013
- ansys/fluent/core/generated/solver/settings_builtin.py +57 -1
- ansys/fluent/core/generated/solver/settings_builtin.pyi +79 -0
- ansys/fluent/core/generated/solver/tui_261.py +78 -228
- ansys/fluent/core/launcher/container_launcher.py +7 -9
- ansys/fluent/core/launcher/fluent_container.py +106 -75
- ansys/fluent/core/launcher/launch_options.py +22 -1
- ansys/fluent/core/launcher/launcher.py +5 -4
- ansys/fluent/core/pyfluent_warnings.py +13 -0
- ansys/fluent/core/search.py +170 -83
- ansys/fluent/core/services/app_utilities.py +52 -32
- ansys/fluent/core/services/datamodel_se.py +6 -3
- ansys/fluent/core/services/scheme_eval.py +2 -0
- ansys/fluent/core/services/solution_variables.py +64 -49
- ansys/fluent/core/session.py +36 -30
- ansys/fluent/core/session_base_meshing.py +2 -24
- ansys/fluent/core/session_shared.py +5 -2
- ansys/fluent/core/session_solver.py +15 -9
- ansys/fluent/core/solver/__init__.py +1 -1
- ansys/fluent/core/solver/flobject.py +55 -38
- ansys/fluent/core/solver/settings_builtin_bases.py +14 -7
- ansys/fluent/core/solver/settings_builtin_data.py +121 -540
- ansys/fluent/core/utils/context_managers.py +0 -17
- ansys/fluent/core/utils/fluent_version.py +173 -0
- {ansys_fluent_core-0.32.2.dist-info → ansys_fluent_core-0.33.0.dist-info}/METADATA +9 -9
- {ansys_fluent_core-0.32.2.dist-info → ansys_fluent_core-0.33.0.dist-info}/RECORD +60 -78
- {ansys_fluent_core-0.32.2.dist-info → ansys_fluent_core-0.33.0.dist-info}/WHEEL +1 -1
- ansys/fluent/core/generated/datamodel_222/meshing.py +0 -6332
- ansys/fluent/core/generated/datamodel_222/part_management.py +0 -2072
- ansys/fluent/core/generated/datamodel_222/pm_file_management.py +0 -290
- ansys/fluent/core/generated/datamodel_222/preferences.py +0 -2449
- ansys/fluent/core/generated/datamodel_222/workflow.py +0 -651
- ansys/fluent/core/generated/fluent_version_222.py +0 -5
- ansys/fluent/core/generated/meshing/tui_222.py +0 -9649
- ansys/fluent/core/generated/solver/settings_222.py +0 -29473
- ansys/fluent/core/generated/solver/settings_222.pyi +0 -19590
- ansys/fluent/core/generated/solver/tui_222.py +0 -43451
- ansys/fluent/core/post_objects/__init__.py +0 -21
- ansys/fluent/core/post_objects/check_in_notebook.py +0 -35
- ansys/fluent/core/post_objects/meta.py +0 -926
- ansys/fluent/core/post_objects/post_helper.py +0 -178
- ansys/fluent/core/post_objects/post_object_definitions.py +0 -693
- ansys/fluent/core/post_objects/post_objects_container.py +0 -248
- ansys/fluent/core/post_objects/singleton_meta.py +0 -42
- ansys/fluent/core/post_objects/timing_decorator.py +0 -38
- {ansys_fluent_core-0.32.2.dist-info → ansys_fluent_core-0.33.0.dist-info/licenses}/LICENSE +0 -0
|
@@ -1,693 +0,0 @@
|
|
|
1
|
-
# Copyright (C) 2021 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
# furnished to do so, subject to the following conditions:
|
|
11
|
-
#
|
|
12
|
-
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
# copies or substantial portions of the Software.
|
|
14
|
-
#
|
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
# SOFTWARE.
|
|
22
|
-
|
|
23
|
-
"""Module providing visualization objects definition."""
|
|
24
|
-
|
|
25
|
-
from abc import abstractmethod
|
|
26
|
-
import logging
|
|
27
|
-
from typing import List, NamedTuple
|
|
28
|
-
|
|
29
|
-
from ansys.fluent.core.post_objects.meta import (
|
|
30
|
-
Attribute,
|
|
31
|
-
PyLocalNamedObjectMetaAbstract,
|
|
32
|
-
PyLocalObjectMeta,
|
|
33
|
-
PyLocalPropertyMeta,
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
logger = logging.getLogger("pyfluent.post_objects")
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class BasePostObjectDefn:
|
|
40
|
-
"""Base class for visualization objects."""
|
|
41
|
-
|
|
42
|
-
def _pre_display(self):
|
|
43
|
-
local_surfaces_provider = self.get_root()._local_surfaces_provider()
|
|
44
|
-
for surf_name in self.surfaces():
|
|
45
|
-
if surf_name in list(local_surfaces_provider):
|
|
46
|
-
surf_obj = local_surfaces_provider[surf_name]
|
|
47
|
-
surf_api = surf_obj._api_helper.surface_api
|
|
48
|
-
surf_api.create_surface_on_server()
|
|
49
|
-
|
|
50
|
-
def _post_display(self):
|
|
51
|
-
local_surfaces_provider = self.get_root()._local_surfaces_provider()
|
|
52
|
-
for surf_name in self.surfaces():
|
|
53
|
-
if surf_name in list(local_surfaces_provider):
|
|
54
|
-
surf_obj = local_surfaces_provider[surf_name]
|
|
55
|
-
surf_api = surf_obj._api_helper.surface_api
|
|
56
|
-
surf_api.delete_surface_on_server()
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
class GraphicsDefn(BasePostObjectDefn, metaclass=PyLocalNamedObjectMetaAbstract):
|
|
60
|
-
"""Abstract base class for graphics objects."""
|
|
61
|
-
|
|
62
|
-
@abstractmethod
|
|
63
|
-
def display(self, window_id: str | None = None):
|
|
64
|
-
"""Display graphics.
|
|
65
|
-
|
|
66
|
-
Parameters
|
|
67
|
-
----------
|
|
68
|
-
window_id : str, optional
|
|
69
|
-
Window ID. If not specified, unique ID is used.
|
|
70
|
-
"""
|
|
71
|
-
pass
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
class PlotDefn(BasePostObjectDefn, metaclass=PyLocalNamedObjectMetaAbstract):
|
|
75
|
-
"""Abstract base class for plot objects."""
|
|
76
|
-
|
|
77
|
-
@abstractmethod
|
|
78
|
-
def plot(self, window_id: str | None = None):
|
|
79
|
-
"""Draw plot.
|
|
80
|
-
|
|
81
|
-
Parameters
|
|
82
|
-
----------
|
|
83
|
-
window_id : str, optional
|
|
84
|
-
Window ID. If not specified, unique ID is used.
|
|
85
|
-
"""
|
|
86
|
-
pass
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
class Vector(NamedTuple):
|
|
90
|
-
"""Class for vector definition."""
|
|
91
|
-
|
|
92
|
-
x: float
|
|
93
|
-
y: float
|
|
94
|
-
z: float
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
class MonitorDefn(PlotDefn):
|
|
98
|
-
"""Monitor Definition."""
|
|
99
|
-
|
|
100
|
-
PLURAL = "Monitors"
|
|
101
|
-
|
|
102
|
-
class monitor_set_name(metaclass=PyLocalPropertyMeta):
|
|
103
|
-
"""Monitor set name."""
|
|
104
|
-
|
|
105
|
-
value: str = None
|
|
106
|
-
|
|
107
|
-
@Attribute
|
|
108
|
-
def allowed_values(self):
|
|
109
|
-
"""Monitor set allowed values."""
|
|
110
|
-
return self._api_helper.monitors.get_monitor_set_names()
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
class XYPlotDefn(PlotDefn):
|
|
114
|
-
"""XYPlot Definition."""
|
|
115
|
-
|
|
116
|
-
PLURAL = "XYPlots"
|
|
117
|
-
|
|
118
|
-
class node_values(metaclass=PyLocalPropertyMeta):
|
|
119
|
-
"""Plot nodal values."""
|
|
120
|
-
|
|
121
|
-
value: bool = True
|
|
122
|
-
|
|
123
|
-
class boundary_values(metaclass=PyLocalPropertyMeta):
|
|
124
|
-
"""Plot Boundary values."""
|
|
125
|
-
|
|
126
|
-
value: bool = True
|
|
127
|
-
|
|
128
|
-
class direction_vector(metaclass=PyLocalPropertyMeta):
|
|
129
|
-
"""Direction Vector."""
|
|
130
|
-
|
|
131
|
-
value: Vector = [1, 0, 0]
|
|
132
|
-
|
|
133
|
-
class y_axis_function(metaclass=PyLocalPropertyMeta):
|
|
134
|
-
"""Y Axis Function."""
|
|
135
|
-
|
|
136
|
-
value: str = None
|
|
137
|
-
|
|
138
|
-
@Attribute
|
|
139
|
-
def allowed_values(self):
|
|
140
|
-
"""Y axis function allowed values."""
|
|
141
|
-
return list(self._api_helper.field_info().get_scalar_fields_info())
|
|
142
|
-
|
|
143
|
-
class x_axis_function(metaclass=PyLocalPropertyMeta):
|
|
144
|
-
"""X Axis Function."""
|
|
145
|
-
|
|
146
|
-
value: str = "direction-vector"
|
|
147
|
-
|
|
148
|
-
@Attribute
|
|
149
|
-
def allowed_values(self):
|
|
150
|
-
"""X axis function allowed values."""
|
|
151
|
-
return ["direction-vector"]
|
|
152
|
-
|
|
153
|
-
class surfaces(metaclass=PyLocalPropertyMeta):
|
|
154
|
-
"""List of surfaces for plotting."""
|
|
155
|
-
|
|
156
|
-
value: List[str] = []
|
|
157
|
-
|
|
158
|
-
@Attribute
|
|
159
|
-
def allowed_values(self):
|
|
160
|
-
"""Surface list allowed values."""
|
|
161
|
-
return list(
|
|
162
|
-
self._api_helper.field_info().get_surfaces_info().keys()
|
|
163
|
-
) + list(self.get_root()._local_surfaces_provider())
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
class MeshDefn(GraphicsDefn):
|
|
167
|
-
"""Mesh graphics definition."""
|
|
168
|
-
|
|
169
|
-
PLURAL = "Meshes"
|
|
170
|
-
|
|
171
|
-
class surfaces(metaclass=PyLocalPropertyMeta):
|
|
172
|
-
"""List of surfaces for mesh graphics."""
|
|
173
|
-
|
|
174
|
-
value: List[str] = []
|
|
175
|
-
|
|
176
|
-
@Attribute
|
|
177
|
-
def allowed_values(self):
|
|
178
|
-
"""Surface list allowed values."""
|
|
179
|
-
return list(
|
|
180
|
-
(self._api_helper.field_info().get_surfaces_info().keys())
|
|
181
|
-
) + list(self.get_root()._local_surfaces_provider())
|
|
182
|
-
|
|
183
|
-
class show_edges(metaclass=PyLocalPropertyMeta):
|
|
184
|
-
"""Show edges for mesh."""
|
|
185
|
-
|
|
186
|
-
value: bool = False
|
|
187
|
-
|
|
188
|
-
class show_nodes(metaclass=PyLocalPropertyMeta):
|
|
189
|
-
"""Show nodes for mesh."""
|
|
190
|
-
|
|
191
|
-
value: bool = False
|
|
192
|
-
|
|
193
|
-
class show_faces(metaclass=PyLocalPropertyMeta):
|
|
194
|
-
"""Show faces for mesh."""
|
|
195
|
-
|
|
196
|
-
value: bool = True
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
class PathlinesDefn(GraphicsDefn):
|
|
200
|
-
"""Pathlines definition."""
|
|
201
|
-
|
|
202
|
-
PLURAL = "Pathlines"
|
|
203
|
-
|
|
204
|
-
class field(metaclass=PyLocalPropertyMeta):
|
|
205
|
-
"""Pathlines field."""
|
|
206
|
-
|
|
207
|
-
value: str = None
|
|
208
|
-
|
|
209
|
-
@Attribute
|
|
210
|
-
def allowed_values(self):
|
|
211
|
-
"""Field allowed values."""
|
|
212
|
-
return list(self._api_helper.field_info().get_scalar_fields_info())
|
|
213
|
-
|
|
214
|
-
class surfaces(metaclass=PyLocalPropertyMeta):
|
|
215
|
-
"""List of surfaces for pathlines."""
|
|
216
|
-
|
|
217
|
-
value: List[str] = []
|
|
218
|
-
|
|
219
|
-
@Attribute
|
|
220
|
-
def allowed_values(self):
|
|
221
|
-
"""Surface list allowed values."""
|
|
222
|
-
return list(
|
|
223
|
-
(self._api_helper.field_info().get_surfaces_info().keys())
|
|
224
|
-
) + list(self.get_root()._local_surfaces_provider())
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
class SurfaceDefn(GraphicsDefn):
|
|
228
|
-
"""Surface graphics definition."""
|
|
229
|
-
|
|
230
|
-
PLURAL = "Surfaces"
|
|
231
|
-
|
|
232
|
-
@property
|
|
233
|
-
def name(self) -> str:
|
|
234
|
-
"""Return name of the surface."""
|
|
235
|
-
return self._name
|
|
236
|
-
|
|
237
|
-
class show_edges(metaclass=PyLocalPropertyMeta):
|
|
238
|
-
"""Show edges for surface."""
|
|
239
|
-
|
|
240
|
-
value: bool = True
|
|
241
|
-
|
|
242
|
-
class definition(metaclass=PyLocalObjectMeta):
|
|
243
|
-
"""Specify surface definition type."""
|
|
244
|
-
|
|
245
|
-
class type(metaclass=PyLocalPropertyMeta):
|
|
246
|
-
"""Surface type."""
|
|
247
|
-
|
|
248
|
-
value: str = "iso-surface"
|
|
249
|
-
|
|
250
|
-
@Attribute
|
|
251
|
-
def allowed_values(self):
|
|
252
|
-
"""Surface type allowed values."""
|
|
253
|
-
return ["plane-surface", "iso-surface"]
|
|
254
|
-
|
|
255
|
-
class plane_surface(metaclass=PyLocalObjectMeta):
|
|
256
|
-
"""Plane surface definition."""
|
|
257
|
-
|
|
258
|
-
@Attribute
|
|
259
|
-
def is_active(self):
|
|
260
|
-
"""Check whether current object is active or not."""
|
|
261
|
-
return self._parent.type() == "plane-surface"
|
|
262
|
-
|
|
263
|
-
class creation_method(metaclass=PyLocalPropertyMeta):
|
|
264
|
-
"""Creation Method."""
|
|
265
|
-
|
|
266
|
-
value: str = "xy-plane"
|
|
267
|
-
|
|
268
|
-
@Attribute
|
|
269
|
-
def allowed_values(self):
|
|
270
|
-
"""Surface type allowed values."""
|
|
271
|
-
return ["xy-plane", "yz-plane", "zx-plane"]
|
|
272
|
-
|
|
273
|
-
class xy_plane(metaclass=PyLocalObjectMeta):
|
|
274
|
-
"""XY Plane definition."""
|
|
275
|
-
|
|
276
|
-
@Attribute
|
|
277
|
-
def is_active(self):
|
|
278
|
-
"""Check whether current object is active or not."""
|
|
279
|
-
return self._parent.creation_method() == "xy-plane"
|
|
280
|
-
|
|
281
|
-
class z(metaclass=PyLocalPropertyMeta):
|
|
282
|
-
"""Z value."""
|
|
283
|
-
|
|
284
|
-
value: float = 0
|
|
285
|
-
|
|
286
|
-
@Attribute
|
|
287
|
-
def range(self):
|
|
288
|
-
"""Z value range."""
|
|
289
|
-
return self._api_helper.field_info().get_scalar_field_range(
|
|
290
|
-
"z-coordinate", True
|
|
291
|
-
)
|
|
292
|
-
|
|
293
|
-
class yz_plane(metaclass=PyLocalObjectMeta):
|
|
294
|
-
"""YZ Plane definition."""
|
|
295
|
-
|
|
296
|
-
@Attribute
|
|
297
|
-
def is_active(self):
|
|
298
|
-
"""Check whether current object is active or not."""
|
|
299
|
-
return self._parent.creation_method() == "yz-plane"
|
|
300
|
-
|
|
301
|
-
class x(metaclass=PyLocalPropertyMeta):
|
|
302
|
-
"""X value."""
|
|
303
|
-
|
|
304
|
-
value: float = 0
|
|
305
|
-
|
|
306
|
-
@Attribute
|
|
307
|
-
def range(self):
|
|
308
|
-
"""X value range."""
|
|
309
|
-
return self._api_helper.field_info().get_scalar_field_range(
|
|
310
|
-
"x-coordinate", True
|
|
311
|
-
)
|
|
312
|
-
|
|
313
|
-
class zx_plane(metaclass=PyLocalObjectMeta):
|
|
314
|
-
"""ZX Plane definition."""
|
|
315
|
-
|
|
316
|
-
@Attribute
|
|
317
|
-
def is_active(self):
|
|
318
|
-
"""Check whether current object is active or not."""
|
|
319
|
-
return self._parent.creation_method() == "zx-plane"
|
|
320
|
-
|
|
321
|
-
class y(metaclass=PyLocalPropertyMeta):
|
|
322
|
-
"""Y value."""
|
|
323
|
-
|
|
324
|
-
value: float = 0
|
|
325
|
-
|
|
326
|
-
@Attribute
|
|
327
|
-
def range(self):
|
|
328
|
-
"""Y value range."""
|
|
329
|
-
return self._api_helper.field_info().get_scalar_field_range(
|
|
330
|
-
"y-coordinate", True
|
|
331
|
-
)
|
|
332
|
-
|
|
333
|
-
class iso_surface(metaclass=PyLocalObjectMeta):
|
|
334
|
-
"""Iso surface definition."""
|
|
335
|
-
|
|
336
|
-
@Attribute
|
|
337
|
-
def is_active(self):
|
|
338
|
-
"""Check whether current object is active or not."""
|
|
339
|
-
return self._parent.type() == "iso-surface"
|
|
340
|
-
|
|
341
|
-
class field(metaclass=PyLocalPropertyMeta):
|
|
342
|
-
"""Iso surface field."""
|
|
343
|
-
|
|
344
|
-
value: str = None
|
|
345
|
-
|
|
346
|
-
@Attribute
|
|
347
|
-
def allowed_values(self):
|
|
348
|
-
"""Field allowed values."""
|
|
349
|
-
return list(self._api_helper.field_info().get_scalar_fields_info())
|
|
350
|
-
|
|
351
|
-
class rendering(metaclass=PyLocalPropertyMeta):
|
|
352
|
-
"""Iso surface rendering."""
|
|
353
|
-
|
|
354
|
-
value: str = "mesh"
|
|
355
|
-
|
|
356
|
-
@Attribute
|
|
357
|
-
def allowed_values(self):
|
|
358
|
-
"""Surface rendering allowed values."""
|
|
359
|
-
return ["mesh", "contour"]
|
|
360
|
-
|
|
361
|
-
class iso_value(metaclass=PyLocalPropertyMeta):
|
|
362
|
-
"""Iso value for field."""
|
|
363
|
-
|
|
364
|
-
_value: float = None
|
|
365
|
-
|
|
366
|
-
def _reset_on_change(self):
|
|
367
|
-
return [self._parent.field]
|
|
368
|
-
|
|
369
|
-
@property
|
|
370
|
-
def value(self):
|
|
371
|
-
"""Iso value property setter."""
|
|
372
|
-
if getattr(self, "_value", None) is None:
|
|
373
|
-
rnge = self.range
|
|
374
|
-
self._value = (rnge[0] + rnge[1]) / 2.0 if rnge else None
|
|
375
|
-
return self._value
|
|
376
|
-
|
|
377
|
-
@value.setter
|
|
378
|
-
def value(self, value):
|
|
379
|
-
self._value = value
|
|
380
|
-
|
|
381
|
-
@Attribute
|
|
382
|
-
def range(self):
|
|
383
|
-
"""Iso value range."""
|
|
384
|
-
field = self._parent.field()
|
|
385
|
-
if field:
|
|
386
|
-
return self._api_helper.field_info().get_scalar_field_range(
|
|
387
|
-
field, True
|
|
388
|
-
)
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
class ContourDefn(GraphicsDefn):
|
|
392
|
-
"""Contour graphics definition."""
|
|
393
|
-
|
|
394
|
-
PLURAL = "Contours"
|
|
395
|
-
|
|
396
|
-
class field(metaclass=PyLocalPropertyMeta):
|
|
397
|
-
"""Contour field."""
|
|
398
|
-
|
|
399
|
-
value: str = None
|
|
400
|
-
|
|
401
|
-
@Attribute
|
|
402
|
-
def allowed_values(self):
|
|
403
|
-
"""Field allowed values."""
|
|
404
|
-
return list(self._api_helper.field_info().get_scalar_fields_info())
|
|
405
|
-
|
|
406
|
-
class surfaces(metaclass=PyLocalPropertyMeta):
|
|
407
|
-
"""Contour surfaces."""
|
|
408
|
-
|
|
409
|
-
value: List[str] = []
|
|
410
|
-
|
|
411
|
-
@Attribute
|
|
412
|
-
def allowed_values(self):
|
|
413
|
-
"""Surfaces list allowed values."""
|
|
414
|
-
return list(
|
|
415
|
-
self._api_helper.field_info().get_surfaces_info().keys()
|
|
416
|
-
) + list(self.get_root()._local_surfaces_provider())
|
|
417
|
-
|
|
418
|
-
class filled(metaclass=PyLocalPropertyMeta):
|
|
419
|
-
"""Draw filled contour."""
|
|
420
|
-
|
|
421
|
-
value: bool = True
|
|
422
|
-
|
|
423
|
-
class node_values(metaclass=PyLocalPropertyMeta):
|
|
424
|
-
"""Draw nodal data."""
|
|
425
|
-
|
|
426
|
-
_value: bool = True
|
|
427
|
-
|
|
428
|
-
@property
|
|
429
|
-
def value(self):
|
|
430
|
-
"""Node value property setter."""
|
|
431
|
-
filled = self.get_ancestors_by_type(ContourDefn).filled()
|
|
432
|
-
auto_range_off = self.get_ancestors_by_type(
|
|
433
|
-
ContourDefn
|
|
434
|
-
).range.auto_range_off
|
|
435
|
-
if not filled or (auto_range_off and auto_range_off.clip_to_range()):
|
|
436
|
-
logger.warning(
|
|
437
|
-
"For unfilled and clipped contours node values are displayed."
|
|
438
|
-
)
|
|
439
|
-
self._value = True
|
|
440
|
-
return self._value
|
|
441
|
-
|
|
442
|
-
@value.setter
|
|
443
|
-
def value(self, value):
|
|
444
|
-
self._value = value
|
|
445
|
-
|
|
446
|
-
class boundary_values(metaclass=PyLocalPropertyMeta):
|
|
447
|
-
"""Draw boundary values."""
|
|
448
|
-
|
|
449
|
-
value: bool = False
|
|
450
|
-
|
|
451
|
-
class contour_lines(metaclass=PyLocalPropertyMeta):
|
|
452
|
-
"""Draw contour lines."""
|
|
453
|
-
|
|
454
|
-
value: bool = False
|
|
455
|
-
|
|
456
|
-
class show_edges(metaclass=PyLocalPropertyMeta):
|
|
457
|
-
"""Show edges."""
|
|
458
|
-
|
|
459
|
-
value: bool = False
|
|
460
|
-
|
|
461
|
-
class range(metaclass=PyLocalObjectMeta):
|
|
462
|
-
"""Range definition."""
|
|
463
|
-
|
|
464
|
-
class option(metaclass=PyLocalPropertyMeta):
|
|
465
|
-
"""Range option."""
|
|
466
|
-
|
|
467
|
-
value: str = "auto-range-on"
|
|
468
|
-
|
|
469
|
-
@Attribute
|
|
470
|
-
def allowed_values(self):
|
|
471
|
-
"""Range option allowed values."""
|
|
472
|
-
return ["auto-range-on", "auto-range-off"]
|
|
473
|
-
|
|
474
|
-
class auto_range_on(metaclass=PyLocalObjectMeta):
|
|
475
|
-
"""Auto range on definition."""
|
|
476
|
-
|
|
477
|
-
@Attribute
|
|
478
|
-
def is_active(self):
|
|
479
|
-
"""Check whether current object is active or not."""
|
|
480
|
-
return self._parent.option() == "auto-range-on"
|
|
481
|
-
|
|
482
|
-
class global_range(metaclass=PyLocalPropertyMeta):
|
|
483
|
-
"""Show global range."""
|
|
484
|
-
|
|
485
|
-
value: bool = False
|
|
486
|
-
|
|
487
|
-
class auto_range_off(metaclass=PyLocalObjectMeta):
|
|
488
|
-
"""Auto range off definition."""
|
|
489
|
-
|
|
490
|
-
@Attribute
|
|
491
|
-
def is_active(self):
|
|
492
|
-
"""Check whether current object is active or not."""
|
|
493
|
-
return self._parent.option() == "auto-range-off"
|
|
494
|
-
|
|
495
|
-
class clip_to_range(metaclass=PyLocalPropertyMeta):
|
|
496
|
-
"""Clip contour within range."""
|
|
497
|
-
|
|
498
|
-
value: bool = False
|
|
499
|
-
|
|
500
|
-
class minimum(metaclass=PyLocalPropertyMeta):
|
|
501
|
-
"""Range minimum."""
|
|
502
|
-
|
|
503
|
-
_value: float = None
|
|
504
|
-
|
|
505
|
-
def _reset_on_change(self):
|
|
506
|
-
return [
|
|
507
|
-
self.get_ancestors_by_type(ContourDefn).field,
|
|
508
|
-
self.get_ancestors_by_type(ContourDefn).node_values,
|
|
509
|
-
]
|
|
510
|
-
|
|
511
|
-
@property
|
|
512
|
-
def value(self):
|
|
513
|
-
"""Range minimum property setter."""
|
|
514
|
-
if getattr(self, "_value", None) is None:
|
|
515
|
-
field = self.get_ancestors_by_type(ContourDefn).field()
|
|
516
|
-
if field:
|
|
517
|
-
field_info = self._api_helper.field_info()
|
|
518
|
-
field_range = field_info.get_scalar_field_range(
|
|
519
|
-
field,
|
|
520
|
-
self.get_ancestors_by_type(ContourDefn).node_values(),
|
|
521
|
-
)
|
|
522
|
-
self._value = field_range[0]
|
|
523
|
-
return self._value
|
|
524
|
-
|
|
525
|
-
@value.setter
|
|
526
|
-
def value(self, value):
|
|
527
|
-
self._value = value
|
|
528
|
-
|
|
529
|
-
class maximum(metaclass=PyLocalPropertyMeta):
|
|
530
|
-
"""Range maximum."""
|
|
531
|
-
|
|
532
|
-
_value: float = None
|
|
533
|
-
|
|
534
|
-
def _reset_on_change(self):
|
|
535
|
-
return [
|
|
536
|
-
self.get_ancestors_by_type(ContourDefn).field,
|
|
537
|
-
self.get_ancestors_by_type(ContourDefn).node_values,
|
|
538
|
-
]
|
|
539
|
-
|
|
540
|
-
@property
|
|
541
|
-
def value(self):
|
|
542
|
-
"""Range maximum property setter."""
|
|
543
|
-
if getattr(self, "_value", None) is None:
|
|
544
|
-
field = self.get_ancestors_by_type(ContourDefn).field()
|
|
545
|
-
if field:
|
|
546
|
-
field_info = self._api_helper.field_info()
|
|
547
|
-
field_range = field_info.get_scalar_field_range(
|
|
548
|
-
field,
|
|
549
|
-
self.get_ancestors_by_type(ContourDefn).node_values(),
|
|
550
|
-
)
|
|
551
|
-
self._value = field_range[1]
|
|
552
|
-
|
|
553
|
-
return self._value
|
|
554
|
-
|
|
555
|
-
@value.setter
|
|
556
|
-
def value(self, value):
|
|
557
|
-
self._value = value
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
class VectorDefn(GraphicsDefn):
|
|
561
|
-
"""Vector graphics definition."""
|
|
562
|
-
|
|
563
|
-
PLURAL = "Vectors"
|
|
564
|
-
|
|
565
|
-
class vectors_of(metaclass=PyLocalPropertyMeta):
|
|
566
|
-
"""Vector type."""
|
|
567
|
-
|
|
568
|
-
value: str = "velocity"
|
|
569
|
-
|
|
570
|
-
@Attribute
|
|
571
|
-
def allowed_values(self):
|
|
572
|
-
"""Vectors of allowed values."""
|
|
573
|
-
if hasattr(self._api_helper.field_info(), "get_vector_fields_info"):
|
|
574
|
-
return list(self._api_helper.field_info().get_vector_fields_info())
|
|
575
|
-
return list(self._api_helper.get_vector_fields())
|
|
576
|
-
|
|
577
|
-
class field(metaclass=PyLocalPropertyMeta):
|
|
578
|
-
"""Vector color field."""
|
|
579
|
-
|
|
580
|
-
value: str = None
|
|
581
|
-
|
|
582
|
-
@Attribute
|
|
583
|
-
def allowed_values(self):
|
|
584
|
-
"""Field allowed values."""
|
|
585
|
-
return list(self._api_helper.field_info().get_scalar_fields_info())
|
|
586
|
-
|
|
587
|
-
class surfaces(metaclass=PyLocalPropertyMeta):
|
|
588
|
-
"""List of surfaces for vector graphics."""
|
|
589
|
-
|
|
590
|
-
value: List[str] = []
|
|
591
|
-
|
|
592
|
-
@Attribute
|
|
593
|
-
def allowed_values(self):
|
|
594
|
-
"""Surface list allowed values."""
|
|
595
|
-
return list(
|
|
596
|
-
self._api_helper.field_info().get_surfaces_info().keys()
|
|
597
|
-
) + list(self.get_root()._local_surfaces_provider())
|
|
598
|
-
|
|
599
|
-
class scale(metaclass=PyLocalPropertyMeta):
|
|
600
|
-
"""Vector scale."""
|
|
601
|
-
|
|
602
|
-
value: float = 1.0
|
|
603
|
-
|
|
604
|
-
class skip(metaclass=PyLocalPropertyMeta):
|
|
605
|
-
"""Vector skip."""
|
|
606
|
-
|
|
607
|
-
value: int = 0
|
|
608
|
-
|
|
609
|
-
class show_edges(metaclass=PyLocalPropertyMeta):
|
|
610
|
-
"""Show edges."""
|
|
611
|
-
|
|
612
|
-
value: bool = False
|
|
613
|
-
|
|
614
|
-
class range(metaclass=PyLocalObjectMeta):
|
|
615
|
-
"""Range definition."""
|
|
616
|
-
|
|
617
|
-
class option(metaclass=PyLocalPropertyMeta):
|
|
618
|
-
"""Range option."""
|
|
619
|
-
|
|
620
|
-
value: str = "auto-range-on"
|
|
621
|
-
|
|
622
|
-
@Attribute
|
|
623
|
-
def allowed_values(self):
|
|
624
|
-
"""Range option allowed values."""
|
|
625
|
-
return ["auto-range-on", "auto-range-off"]
|
|
626
|
-
|
|
627
|
-
class auto_range_on(metaclass=PyLocalObjectMeta):
|
|
628
|
-
"""Auto range on definition."""
|
|
629
|
-
|
|
630
|
-
@Attribute
|
|
631
|
-
def is_active(self):
|
|
632
|
-
"""Check whether current object is active or not."""
|
|
633
|
-
return self._parent.option() == "auto-range-on"
|
|
634
|
-
|
|
635
|
-
class global_range(metaclass=PyLocalPropertyMeta):
|
|
636
|
-
"""Show global range."""
|
|
637
|
-
|
|
638
|
-
value: bool = False
|
|
639
|
-
|
|
640
|
-
class auto_range_off(metaclass=PyLocalObjectMeta):
|
|
641
|
-
"""Auto range off definition."""
|
|
642
|
-
|
|
643
|
-
@Attribute
|
|
644
|
-
def is_active(self):
|
|
645
|
-
"""Check whether current object is active or not."""
|
|
646
|
-
return self._parent.option() == "auto-range-off"
|
|
647
|
-
|
|
648
|
-
class clip_to_range(metaclass=PyLocalPropertyMeta):
|
|
649
|
-
"""Clip vector within range."""
|
|
650
|
-
|
|
651
|
-
value: bool = False
|
|
652
|
-
|
|
653
|
-
class minimum(metaclass=PyLocalPropertyMeta):
|
|
654
|
-
"""Range minimum."""
|
|
655
|
-
|
|
656
|
-
_value: float = None
|
|
657
|
-
|
|
658
|
-
@property
|
|
659
|
-
def value(self):
|
|
660
|
-
"""Range minimum property setter."""
|
|
661
|
-
if getattr(self, "_value", None) is None:
|
|
662
|
-
field_info = self._api_helper.field_info()
|
|
663
|
-
field_range = field_info.get_scalar_field_range(
|
|
664
|
-
"velocity-magnitude",
|
|
665
|
-
False,
|
|
666
|
-
)
|
|
667
|
-
self._value = field_range[0]
|
|
668
|
-
return self._value
|
|
669
|
-
|
|
670
|
-
@value.setter
|
|
671
|
-
def value(self, value):
|
|
672
|
-
self._value = value
|
|
673
|
-
|
|
674
|
-
class maximum(metaclass=PyLocalPropertyMeta):
|
|
675
|
-
"""Range maximum."""
|
|
676
|
-
|
|
677
|
-
_value: float = None
|
|
678
|
-
|
|
679
|
-
@property
|
|
680
|
-
def value(self):
|
|
681
|
-
"""Range maximum property setter."""
|
|
682
|
-
if getattr(self, "_value", None) is None:
|
|
683
|
-
field_info = self._api_helper.field_info()
|
|
684
|
-
field_range = field_info.get_scalar_field_range(
|
|
685
|
-
"velocity-magnitude",
|
|
686
|
-
False,
|
|
687
|
-
)
|
|
688
|
-
self._value = field_range[1]
|
|
689
|
-
return self._value
|
|
690
|
-
|
|
691
|
-
@value.setter
|
|
692
|
-
def value(self, value):
|
|
693
|
-
self._value = value
|