ansys-fluent-core 0.28.2__py3-none-any.whl → 0.29.dev1__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.

Files changed (103) hide show
  1. ansys/fluent/core/__init__.py +1 -1
  2. ansys/fluent/core/_version.py +2 -2
  3. ansys/fluent/core/codegen/tuigen.py +1 -1
  4. ansys/fluent/core/codegen/walk_api.py +45 -18
  5. ansys/fluent/core/generated/api_tree/api_objects.json +1 -1
  6. ansys/fluent/core/generated/datamodel_252/meshing.py +1 -0
  7. ansys/fluent/core/generated/fluent_version_252.py +3 -3
  8. ansys/fluent/core/generated/solver/settings_252.py +251 -160
  9. ansys/fluent/core/generated/solver/settings_252.pyi +146 -54
  10. ansys/fluent/core/generated/solver/tui_252.py +48 -24
  11. ansys/fluent/core/launcher/container_launcher.py +4 -3
  12. ansys/fluent/core/launcher/fluent_container.py +22 -19
  13. ansys/fluent/core/launcher/launcher.py +2 -2
  14. ansys/fluent/core/launcher/pim_launcher.py +2 -2
  15. ansys/fluent/core/launcher/slurm_launcher.py +2 -2
  16. ansys/fluent/core/launcher/standalone_launcher.py +2 -2
  17. ansys/fluent/core/logging.py +2 -0
  18. ansys/fluent/core/logging_config.yaml +3 -0
  19. ansys/fluent/core/services/datamodel_se.py +4 -1
  20. ansys/fluent/core/services/field_data.py +252 -0
  21. ansys/fluent/core/services/interceptors.py +28 -2
  22. ansys/fluent/core/session.py +7 -2
  23. ansys/fluent/core/session_solver.py +21 -0
  24. {ansys_fluent_core-0.28.2.dist-info → ansys_fluent_core-0.29.dev1.dist-info}/LICENSE +1 -1
  25. {ansys_fluent_core-0.28.2.dist-info → ansys_fluent_core-0.29.dev1.dist-info}/METADATA +53 -32
  26. {ansys_fluent_core-0.28.2.dist-info → ansys_fluent_core-0.29.dev1.dist-info}/RECORD +61 -137
  27. {ansys_fluent_core-0.28.2.dist-info → ansys_fluent_core-0.29.dev1.dist-info}/WHEEL +1 -1
  28. ansys/fluent/core/docs/README.rst +0 -155
  29. ansys/fluent/tests/conftest.py +0 -415
  30. ansys/fluent/tests/fluent_fixtures.py +0 -195
  31. ansys/fluent/tests/integration/test_optislang/test_optislang_integration.py +0 -263
  32. ansys/fluent/tests/parametric/test_local_parametric_run.py +0 -36
  33. ansys/fluent/tests/parametric/test_local_parametric_setup.py +0 -34
  34. ansys/fluent/tests/parametric/test_parametric_workflow.py +0 -279
  35. ansys/fluent/tests/test_aero_session.py +0 -88
  36. ansys/fluent/tests/test_batch_ops.py +0 -39
  37. ansys/fluent/tests/test_builtin_settings.py +0 -761
  38. ansys/fluent/tests/test_cad_to_post_ftm.py +0 -525
  39. ansys/fluent/tests/test_cad_to_post_wtm.py +0 -250
  40. ansys/fluent/tests/test_casereader.py +0 -324
  41. ansys/fluent/tests/test_codegen.py +0 -783
  42. ansys/fluent/tests/test_creatable.py +0 -31
  43. ansys/fluent/tests/test_data_model_cache.py +0 -434
  44. ansys/fluent/tests/test_datamodel_api.py +0 -429
  45. ansys/fluent/tests/test_datamodel_service.py +0 -814
  46. ansys/fluent/tests/test_datareader.py +0 -103
  47. ansys/fluent/tests/test_error_handling.py +0 -24
  48. ansys/fluent/tests/test_events_manager.py +0 -214
  49. ansys/fluent/tests/test_field_data.py +0 -466
  50. ansys/fluent/tests/test_file_session.py +0 -355
  51. ansys/fluent/tests/test_file_transfer_service.py +0 -165
  52. ansys/fluent/tests/test_fix_doc.py +0 -29
  53. ansys/fluent/tests/test_flobject.py +0 -1235
  54. ansys/fluent/tests/test_fluent_fixes.py +0 -106
  55. ansys/fluent/tests/test_fluent_session.py +0 -270
  56. ansys/fluent/tests/test_fluent_version.py +0 -66
  57. ansys/fluent/tests/test_fluent_version_marker.py +0 -65
  58. ansys/fluent/tests/test_icing_session.py +0 -9
  59. ansys/fluent/tests/test_launcher.py +0 -529
  60. ansys/fluent/tests/test_launcher_remote.py +0 -272
  61. ansys/fluent/tests/test_lispy.py +0 -40
  62. ansys/fluent/tests/test_logging.py +0 -16
  63. ansys/fluent/tests/test_mapped_api.py +0 -766
  64. ansys/fluent/tests/test_meshing_utilities.py +0 -2436
  65. ansys/fluent/tests/test_meshing_workflow.py +0 -421
  66. ansys/fluent/tests/test_meshingmode/test_meshing_launch.py +0 -168
  67. ansys/fluent/tests/test_new_meshing_workflow.py +0 -1801
  68. ansys/fluent/tests/test_preferences.py +0 -89
  69. ansys/fluent/tests/test_pure_mesh_vs_mesh_workflow.py +0 -101
  70. ansys/fluent/tests/test_reduction.py +0 -484
  71. ansys/fluent/tests/test_rp_vars.py +0 -77
  72. ansys/fluent/tests/test_scheduler.py +0 -471
  73. ansys/fluent/tests/test_scheme_eval_222.py +0 -338
  74. ansys/fluent/tests/test_scheme_eval_231.py +0 -243
  75. ansys/fluent/tests/test_search.py +0 -344
  76. ansys/fluent/tests/test_session.py +0 -594
  77. ansys/fluent/tests/test_settings_api.py +0 -606
  78. ansys/fluent/tests/test_settings_reader.py +0 -85
  79. ansys/fluent/tests/test_slurm_future.py +0 -67
  80. ansys/fluent/tests/test_solution_variables.py +0 -241
  81. ansys/fluent/tests/test_solver_monitors.py +0 -83
  82. ansys/fluent/tests/test_solvermode/boundaries_periodic_expDict +0 -1712
  83. ansys/fluent/tests/test_solvermode/test_boundaries.py +0 -127
  84. ansys/fluent/tests/test_solvermode/test_calculationactivities.py +0 -20
  85. ansys/fluent/tests/test_solvermode/test_controls.py +0 -131
  86. ansys/fluent/tests/test_solvermode/test_general.py +0 -109
  87. ansys/fluent/tests/test_solvermode/test_initialization.py +0 -83
  88. ansys/fluent/tests/test_solvermode/test_materials.py +0 -40
  89. ansys/fluent/tests/test_solvermode/test_methods.py +0 -65
  90. ansys/fluent/tests/test_solvermode/test_models.py +0 -99
  91. ansys/fluent/tests/test_solvermode/test_named_expressions.py +0 -35
  92. ansys/fluent/tests/test_solvermode/test_post_vector.py +0 -22
  93. ansys/fluent/tests/test_solvermode/test_species_model.py +0 -67
  94. ansys/fluent/tests/test_streaming_services.py +0 -52
  95. ansys/fluent/tests/test_systemcoupling.py +0 -44
  96. ansys/fluent/tests/test_topy.py +0 -179
  97. ansys/fluent/tests/test_tui_api.py +0 -70
  98. ansys/fluent/tests/test_type_stub.py +0 -37
  99. ansys/fluent/tests/test_utils.py +0 -82
  100. ansys/fluent/tests/util/__init__.py +0 -36
  101. ansys/fluent/tests/util/meshing_workflow.py +0 -33
  102. ansys/fluent/tests/util/solver.py +0 -72
  103. ansys_fluent_core-0.28.2.dist-info/AUTHORS +0 -12
@@ -1,344 +0,0 @@
1
- import sys
2
-
3
- import pytest
4
-
5
- import ansys.fluent.core as pyfluent
6
- from ansys.fluent.core.search import (
7
- _get_api_tree_data,
8
- _get_capitalize_match_for_word_from_names,
9
- _get_close_matches_for_word_from_names,
10
- _get_exact_match_for_word_from_names,
11
- _get_match_case_for_word_from_names,
12
- _get_wildcard_matches_for_word_from_names,
13
- _search_semantic,
14
- _search_whole_word,
15
- _search_wildcard,
16
- )
17
-
18
-
19
- @pytest.mark.codegen_required
20
- @pytest.mark.fluent_version("==24.2")
21
- def test_nltk_data_download():
22
- import nltk
23
-
24
- packages = ["wordnet", "omw-1.4"]
25
- for package in packages:
26
- nltk.download(package, quiet=True)
27
-
28
- api_tree_data = _get_api_tree_data()
29
- _search_semantic("读", language="cmn", api_tree_data=api_tree_data)
30
-
31
-
32
- @pytest.mark.fluent_version("==24.2")
33
- @pytest.mark.codegen_required
34
- def test_get_exact_match_for_word_from_names():
35
- api_tree_data = _get_api_tree_data()
36
- api_object_names = api_tree_data["all_api_object_names"]
37
- exact_match = _get_exact_match_for_word_from_names(
38
- "VideoResoutionY",
39
- names=api_object_names,
40
- )
41
- assert "VideoResoutionY" in exact_match
42
- assert len(exact_match) == 1
43
-
44
-
45
- @pytest.mark.fluent_version("==24.2")
46
- @pytest.mark.codegen_required
47
- def test_get_capitalize_match_for_word_from_names():
48
- api_tree_data = _get_api_tree_data()
49
- api_object_names = api_tree_data["all_api_object_names"]
50
- capitalize_match_cases = _get_capitalize_match_for_word_from_names(
51
- "font",
52
- names=api_object_names,
53
- )
54
- assert "font" not in capitalize_match_cases
55
- assert set(capitalize_match_cases) == set(
56
- [
57
- "TextFontAutomaticHorizontalSize",
58
- "TextFontName",
59
- "TextFontFixedHorizontalSize",
60
- "TextFontFixedSize",
61
- "TextFontAutomaticSize",
62
- "TextFontFixedVerticalSize",
63
- "TextFontAutomaticVerticalSize",
64
- "ApplicationFontSize",
65
- "TextFontFixedUnits",
66
- "TextFontAutomaticUnits",
67
- "Font",
68
- ]
69
- )
70
-
71
-
72
- @pytest.mark.fluent_version("==24.2")
73
- @pytest.mark.codegen_required
74
- def test_get_match_case_for_word_from_names():
75
- api_tree_data = _get_api_tree_data()
76
- api_object_names = api_tree_data["all_api_object_names"]
77
- match_cases = _get_match_case_for_word_from_names(
78
- "font",
79
- names=api_object_names,
80
- )
81
- for match_case in match_cases:
82
- assert "Font" not in match_case
83
- assert "font" in match_case
84
- assert set(match_cases) == set(
85
- [
86
- "text_font_fixed_units",
87
- "text_font_automatic_horizontal_size",
88
- "font_name",
89
- "font_size",
90
- "text_font_fixed_size",
91
- "label_font",
92
- "text_font_fixed_vertical_size",
93
- "text_font_automatic_vertical_size",
94
- "text_font_automatic_units",
95
- "font",
96
- "text_font_automatic_size",
97
- "text_font_fixed_horizontal_size",
98
- "application_font_size",
99
- "font_automatic",
100
- "text_font_name",
101
- ]
102
- )
103
-
104
-
105
- @pytest.mark.fluent_version("==24.2")
106
- @pytest.mark.codegen_required
107
- def test_get_wildcard_matches_for_word_from_names():
108
- api_tree_data = _get_api_tree_data()
109
- api_object_names = api_tree_data["all_api_object_names"]
110
- wildcard_matches = _get_wildcard_matches_for_word_from_names(
111
- "iter*",
112
- names=api_object_names,
113
- )
114
- assert set(wildcard_matches) == set(
115
- [
116
- "iter_count",
117
- "iterating",
118
- "iter_per_coupling_count",
119
- "iteration_at_creation_or_edit",
120
- "iteration_interval",
121
- "iteration_number_of_samples_or_levels",
122
- "iterations",
123
- "iterate",
124
- "iterate_steady_2way_fsi",
125
- "iteration",
126
- "iteration_sampling_type",
127
- "iteration_count",
128
- "iteration_parameters",
129
- ]
130
- )
131
-
132
-
133
- @pytest.mark.fluent_version("==24.2")
134
- @pytest.mark.codegen_required
135
- def test_get_close_matches_for_word_from_names():
136
- api_tree_data = _get_api_tree_data()
137
- api_object_names = api_tree_data["all_api_object_names"]
138
- close_matches = _get_close_matches_for_word_from_names(
139
- "font",
140
- names=api_object_names,
141
- )
142
- assert "font" in close_matches
143
-
144
- close_matches = _get_close_matches_for_word_from_names(
145
- "fnt",
146
- names=api_object_names,
147
- )
148
- assert "font" in close_matches
149
-
150
- close_matches = _get_close_matches_for_word_from_names(
151
- "solve_flow",
152
- names=api_object_names,
153
- )
154
- assert "solve_flow_last" in close_matches
155
-
156
- close_matches = _get_close_matches_for_word_from_names(
157
- "sunshine",
158
- names=api_object_names,
159
- )
160
- assert "sunshine_factor" in close_matches
161
-
162
-
163
- @pytest.mark.fluent_version("==24.2")
164
- @pytest.mark.codegen_required
165
- def test_search_wildcard(capsys):
166
- api_tree_data = _get_api_tree_data()
167
- _search_wildcard(
168
- "max*",
169
- api_tree_data=api_tree_data,
170
- )
171
- lines = capsys.readouterr().out.splitlines()
172
- assert (
173
- "<solver_session>.solution.run_calculation.cfl_based_adaptive_time_stepping.max_fixed_time_step (Parameter)"
174
- in lines
175
- )
176
-
177
- _search_wildcard(
178
- "min*",
179
- api_tree_data=api_tree_data,
180
- )
181
- lines = capsys.readouterr().out.splitlines()
182
- assert "<solver_session>.solution.controls.limits.min_des_tke (Parameter)" in lines
183
-
184
-
185
- @pytest.mark.fluent_version("==24.2")
186
- @pytest.mark.codegen_required
187
- def test_search_whole_word(capsys):
188
- api_tree_data = _get_api_tree_data()
189
- _search_whole_word(
190
- "RemovePartitionLinesTolerance",
191
- match_case=False,
192
- api_tree_data=api_tree_data,
193
- )
194
- lines = capsys.readouterr().out.splitlines()
195
- assert (
196
- "<meshing_session>.preferences.Graphics.RemovePartitionLinesTolerance (Parameter)"
197
- in lines
198
- )
199
-
200
- _search_whole_word(
201
- "k0_sei",
202
- match_case=False,
203
- api_tree_data=api_tree_data,
204
- )
205
- lines = capsys.readouterr().out.splitlines()
206
- assert (
207
- "<solver_session>.setup.models.battery.tool_kits.standalone_echem_model.k0_sei (Parameter)"
208
- in lines
209
- )
210
-
211
-
212
- @pytest.mark.fluent_version("==24.2")
213
- @pytest.mark.codegen_required
214
- def test_search_semantic(capsys):
215
- api_tree_data = _get_api_tree_data()
216
- _search_semantic("读", language="cmn", api_tree_data=api_tree_data)
217
- lines = capsys.readouterr().out.splitlines()
218
- assert "<solver_session>.file.read_surface_mesh (Command)" in lines
219
-
220
- _search_semantic("フォント", language="jpn", api_tree_data=api_tree_data)
221
- lines = capsys.readouterr().out.splitlines()
222
- assert "<solver_session>.tui.preferences.appearance.charts.font (Object)" in lines
223
-
224
-
225
- @pytest.mark.fluent_version("==24.2")
226
- @pytest.mark.codegen_required
227
- def test_whole_word_search(capsys):
228
- pyfluent.search("Font", match_whole_word=True)
229
- lines = capsys.readouterr().out.splitlines()
230
- assert "font" not in lines
231
- assert "<meshing_session>.preferences.Appearance.Charts.Font (Object)" in lines
232
- assert "<solver_session>.preferences.Appearance.Charts.Font (Object)" in lines
233
-
234
-
235
- @pytest.mark.fluent_version("==24.2")
236
- @pytest.mark.codegen_required
237
- def test_match_case_search(capsys):
238
- pyfluent.search("font", match_whole_word=True, match_case=True)
239
- lines = capsys.readouterr().out.splitlines()
240
- for line in lines:
241
- assert "Font" not in line
242
- assert "font" in line
243
- assert "<solver_session>.tui.preferences.appearance.charts.font (Object)" in lines
244
- assert "<meshing_session>.tui.preferences.appearance.charts.font (Object)" in lines
245
-
246
-
247
- @pytest.mark.fluent_version("==24.2")
248
- @pytest.mark.codegen_required
249
- def test_match_whole_word_and_case_search(capsys):
250
- pyfluent.search("font", match_whole_word=True, match_case=True)
251
- lines = capsys.readouterr().out.splitlines()
252
- for line in lines:
253
- assert "font" in line
254
- assert "Font" not in line
255
- assert "<meshing_session>.preferences.Appearance.Charts.Font (Object)" not in lines
256
- assert (
257
- "<solver_session>.preferences.Graphics.ColormapSettings.TextFontAutomaticUnits (Parameter)"
258
- not in lines
259
- )
260
- assert "<meshing_session>.tui.display.set_grid.label_font (Command)" in lines
261
-
262
-
263
- @pytest.mark.fluent_version("==24.2")
264
- @pytest.mark.codegen_required
265
- def test_misspelled_search(capsys):
266
- pyfluent.search("cfb_lma")
267
- lines = capsys.readouterr().out.splitlines()
268
- assert (
269
- "<solver_session>.tui.define.models.viscous.geko_options.cbf_lam (Command)"
270
- in lines
271
- )
272
-
273
-
274
- @pytest.mark.fluent_version("==24.2")
275
- @pytest.mark.codegen_required
276
- def test_wildcard_search(capsys):
277
- pyfluent.search("iter*", wildcard=True)
278
- lines = capsys.readouterr().out.splitlines()
279
- assert "<solver_session>.solution.run_calculation.iter_count (Parameter)" in lines
280
- assert "<solver_session>.solution.run_calculation.iterating (Query)" in lines
281
-
282
-
283
- @pytest.mark.fluent_version("==24.2")
284
- @pytest.mark.codegen_required
285
- def test_chinese_semantic_search(capsys):
286
- pyfluent.search("读", language="cmn")
287
- lines = capsys.readouterr().out.splitlines()
288
- assert "<solver_session>.file.read_case (Command)" in lines
289
-
290
- pyfluent.search("写", language="cmn")
291
- lines = capsys.readouterr().out.splitlines()
292
- assert "<solver_session>.file.write_case (Command)" in lines
293
-
294
-
295
- @pytest.mark.fluent_version("==24.2")
296
- @pytest.mark.codegen_required
297
- def test_japanese_semantic_search(capsys):
298
- pyfluent.search("フォント", language="jpn")
299
- lines = capsys.readouterr().out.splitlines()
300
- assert "<solver_session>.tui.preferences.appearance.charts.font (Object)" in lines
301
-
302
-
303
- def test_match_whole_word(monkeypatch):
304
- monkeypatch.setattr(pyfluent, "PRINT_SEARCH_RESULTS", False)
305
- api_tree_data = {
306
- "api_objects": [
307
- "<solver_session>.parent (Object)",
308
- "<solver_session>.parent.child (Parameter)",
309
- "<solver_session>.first_last (Object)",
310
- "<solver_session>.none (Object)",
311
- ],
312
- "api_tui_objects": [],
313
- "all_api_object_name_synsets": {
314
- "parent": ["parent"],
315
- "child": ["child"],
316
- "first_last": ["first_last"],
317
- "none": ["none"],
318
- },
319
- "all_api_object_names": ["parent", "child", "first_last", "none"],
320
- }
321
-
322
- search_module = sys.modules["ansys.fluent.core.search"]
323
- monkeypatch.setattr(search_module, "_get_api_tree_data", lambda: api_tree_data)
324
-
325
- assert _search_whole_word("parent", api_tree_data=api_tree_data) == [
326
- "<solver_session>.parent (Object)"
327
- ]
328
- assert _search_whole_word("child", api_tree_data=api_tree_data) == [
329
- "<solver_session>.parent.child (Parameter)"
330
- ]
331
- assert pyfluent.search("parent", match_whole_word=True) == [
332
- "<solver_session>.parent (Object)"
333
- ]
334
-
335
- assert pyfluent.search("first", match_whole_word=True) == [
336
- "<solver_session>.first_last (Object)"
337
- ]
338
- assert pyfluent.search("last", match_whole_word=True) == [
339
- "<solver_session>.first_last (Object)"
340
- ]
341
-
342
- assert pyfluent.search("first_last", match_whole_word=True) == [
343
- "<solver_session>.first_last (Object)"
344
- ]