ansys-systemcoupling-core 0.6__py3-none-any.whl → 0.7.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-systemcoupling-core might be problematic. Click here for more details.

Files changed (145) hide show
  1. ansys/systemcoupling/core/adaptor/api_23_1/add_interface.py +2 -2
  2. ansys/systemcoupling/core/adaptor/api_23_1/add_interface_by_display_names.py +2 -2
  3. ansys/systemcoupling/core/adaptor/api_23_1/add_transformation.py +1 -1
  4. ansys/systemcoupling/core/adaptor/api_23_1/partition_participants.py +3 -3
  5. ansys/systemcoupling/core/adaptor/api_23_1/show_plot.py +1 -1
  6. ansys/systemcoupling/core/adaptor/api_23_1/start_participants.py +1 -1
  7. ansys/systemcoupling/core/adaptor/api_23_2/add_interface.py +2 -2
  8. ansys/systemcoupling/core/adaptor/api_23_2/add_interface_by_display_names.py +2 -2
  9. ansys/systemcoupling/core/adaptor/api_23_2/add_transformation.py +1 -1
  10. ansys/systemcoupling/core/adaptor/api_23_2/partition_participants.py +3 -3
  11. ansys/systemcoupling/core/adaptor/api_23_2/show_plot.py +1 -1
  12. ansys/systemcoupling/core/adaptor/api_23_2/start_participants.py +1 -1
  13. ansys/systemcoupling/core/adaptor/api_24_1/add_aerodamping_data_transfers.py +1 -1
  14. ansys/systemcoupling/core/adaptor/api_24_1/add_interface.py +2 -2
  15. ansys/systemcoupling/core/adaptor/api_24_1/add_interface_by_display_names.py +2 -2
  16. ansys/systemcoupling/core/adaptor/api_24_1/add_transformation.py +1 -1
  17. ansys/systemcoupling/core/adaptor/api_24_1/partition_participants.py +3 -3
  18. ansys/systemcoupling/core/adaptor/api_24_1/show_plot.py +1 -1
  19. ansys/systemcoupling/core/adaptor/api_24_1/start_participants.py +1 -1
  20. ansys/systemcoupling/core/adaptor/api_24_2/add_aerodamping_data_transfers.py +1 -1
  21. ansys/systemcoupling/core/adaptor/api_24_2/add_interface.py +2 -2
  22. ansys/systemcoupling/core/adaptor/api_24_2/add_interface_by_display_names.py +2 -2
  23. ansys/systemcoupling/core/adaptor/api_24_2/add_transformation.py +1 -1
  24. ansys/systemcoupling/core/adaptor/api_24_2/partition_participants.py +3 -3
  25. ansys/systemcoupling/core/adaptor/api_24_2/show_plot.py +1 -1
  26. ansys/systemcoupling/core/adaptor/api_24_2/start_participants.py +1 -1
  27. ansys/systemcoupling/core/adaptor/api_25_1/_add_participant.py +80 -0
  28. ansys/systemcoupling/core/adaptor/api_25_1/_clear_state.py +13 -0
  29. ansys/systemcoupling/core/adaptor/api_25_1/_solve.py +13 -0
  30. ansys/systemcoupling/core/adaptor/api_25_1/abort.py +39 -0
  31. ansys/systemcoupling/core/adaptor/api_25_1/activate_hidden.py +46 -0
  32. ansys/systemcoupling/core/adaptor/api_25_1/add_aerodamping_data_transfers.py +43 -0
  33. ansys/systemcoupling/core/adaptor/api_25_1/add_data_transfer.py +190 -0
  34. ansys/systemcoupling/core/adaptor/api_25_1/add_data_transfer_by_display_names.py +191 -0
  35. ansys/systemcoupling/core/adaptor/api_25_1/add_expression_function.py +61 -0
  36. ansys/systemcoupling/core/adaptor/api_25_1/add_flow_boundary_data_transfers.py +32 -0
  37. ansys/systemcoupling/core/adaptor/api_25_1/add_fsi_data_transfers.py +43 -0
  38. ansys/systemcoupling/core/adaptor/api_25_1/add_interface.py +77 -0
  39. ansys/systemcoupling/core/adaptor/api_25_1/add_interface_by_display_names.py +78 -0
  40. ansys/systemcoupling/core/adaptor/api_25_1/add_named_expression.py +42 -0
  41. ansys/systemcoupling/core/adaptor/api_25_1/add_ordered_data_transfers.py +32 -0
  42. ansys/systemcoupling/core/adaptor/api_25_1/add_participant.py +162 -0
  43. ansys/systemcoupling/core/adaptor/api_25_1/add_reference_frame.py +40 -0
  44. ansys/systemcoupling/core/adaptor/api_25_1/add_thermal_data_transfers.py +43 -0
  45. ansys/systemcoupling/core/adaptor/api_25_1/add_transformation.py +102 -0
  46. ansys/systemcoupling/core/adaptor/api_25_1/analysis_control.py +293 -0
  47. ansys/systemcoupling/core/adaptor/api_25_1/apip.py +33 -0
  48. ansys/systemcoupling/core/adaptor/api_25_1/ascii_output.py +44 -0
  49. ansys/systemcoupling/core/adaptor/api_25_1/attribute.py +20 -0
  50. ansys/systemcoupling/core/adaptor/api_25_1/attribute_child.py +64 -0
  51. ansys/systemcoupling/core/adaptor/api_25_1/automatic_alignment_options.py +46 -0
  52. ansys/systemcoupling/core/adaptor/api_25_1/available_ports.py +40 -0
  53. ansys/systemcoupling/core/adaptor/api_25_1/avoid_data_reconstruction.py +46 -0
  54. ansys/systemcoupling/core/adaptor/api_25_1/case_root.py +62 -0
  55. ansys/systemcoupling/core/adaptor/api_25_1/clear_state.py +18 -0
  56. ansys/systemcoupling/core/adaptor/api_25_1/connect_ensight_dvs.py +41 -0
  57. ansys/systemcoupling/core/adaptor/api_25_1/coupling_interface.py +20 -0
  58. ansys/systemcoupling/core/adaptor/api_25_1/coupling_interface_child.py +42 -0
  59. ansys/systemcoupling/core/adaptor/api_25_1/coupling_participant.py +23 -0
  60. ansys/systemcoupling/core/adaptor/api_25_1/coupling_participant_child.py +271 -0
  61. ansys/systemcoupling/core/adaptor/api_25_1/create_restart_point.py +29 -0
  62. ansys/systemcoupling/core/adaptor/api_25_1/data_transfer.py +20 -0
  63. ansys/systemcoupling/core/adaptor/api_25_1/data_transfer_child.py +187 -0
  64. ansys/systemcoupling/core/adaptor/api_25_1/delete_snapshot.py +28 -0
  65. ansys/systemcoupling/core/adaptor/api_25_1/delete_transformation.py +42 -0
  66. ansys/systemcoupling/core/adaptor/api_25_1/dimensionality.py +96 -0
  67. ansys/systemcoupling/core/adaptor/api_25_1/execution_control.py +246 -0
  68. ansys/systemcoupling/core/adaptor/api_25_1/execution_control_1.py +24 -0
  69. ansys/systemcoupling/core/adaptor/api_25_1/expression.py +20 -0
  70. ansys/systemcoupling/core/adaptor/api_25_1/expression_child.py +36 -0
  71. ansys/systemcoupling/core/adaptor/api_25_1/expression_function.py +20 -0
  72. ansys/systemcoupling/core/adaptor/api_25_1/expression_function_child.py +46 -0
  73. ansys/systemcoupling/core/adaptor/api_25_1/external_data_file.py +24 -0
  74. ansys/systemcoupling/core/adaptor/api_25_1/fluent_input.py +77 -0
  75. ansys/systemcoupling/core/adaptor/api_25_1/fmu_parameter.py +20 -0
  76. ansys/systemcoupling/core/adaptor/api_25_1/fmu_parameter_child.py +164 -0
  77. ansys/systemcoupling/core/adaptor/api_25_1/generate_input_file.py +41 -0
  78. ansys/systemcoupling/core/adaptor/api_25_1/get_add_data_transfer_group_commands.py +29 -0
  79. ansys/systemcoupling/core/adaptor/api_25_1/get_execution_command.py +30 -0
  80. ansys/systemcoupling/core/adaptor/api_25_1/get_machines.py +13 -0
  81. ansys/systemcoupling/core/adaptor/api_25_1/get_mode_shape_variables.py +29 -0
  82. ansys/systemcoupling/core/adaptor/api_25_1/get_region_names_for_participant.py +31 -0
  83. ansys/systemcoupling/core/adaptor/api_25_1/get_setup_summary.py +25 -0
  84. ansys/systemcoupling/core/adaptor/api_25_1/get_status_messages.py +52 -0
  85. ansys/systemcoupling/core/adaptor/api_25_1/get_supported_participant_types.py +13 -0
  86. ansys/systemcoupling/core/adaptor/api_25_1/get_thermal_data_transfer_options.py +32 -0
  87. ansys/systemcoupling/core/adaptor/api_25_1/get_transformation.py +43 -0
  88. ansys/systemcoupling/core/adaptor/api_25_1/global_stabilization.py +155 -0
  89. ansys/systemcoupling/core/adaptor/api_25_1/has_input_file_changed.py +36 -0
  90. ansys/systemcoupling/core/adaptor/api_25_1/import_system_coupling_input_file.py +36 -0
  91. ansys/systemcoupling/core/adaptor/api_25_1/initialize.py +27 -0
  92. ansys/systemcoupling/core/adaptor/api_25_1/instancing.py +23 -0
  93. ansys/systemcoupling/core/adaptor/api_25_1/instancing_child.py +62 -0
  94. ansys/systemcoupling/core/adaptor/api_25_1/interrupt.py +39 -0
  95. ansys/systemcoupling/core/adaptor/api_25_1/library.py +37 -0
  96. ansys/systemcoupling/core/adaptor/api_25_1/live_visualization.py +20 -0
  97. ansys/systemcoupling/core/adaptor/api_25_1/live_visualization_child.py +100 -0
  98. ansys/systemcoupling/core/adaptor/api_25_1/mapping_control.py +239 -0
  99. ansys/systemcoupling/core/adaptor/api_25_1/open.py +102 -0
  100. ansys/systemcoupling/core/adaptor/api_25_1/open_results_in_ensight.py +56 -0
  101. ansys/systemcoupling/core/adaptor/api_25_1/open_snapshot.py +37 -0
  102. ansys/systemcoupling/core/adaptor/api_25_1/output_control.py +134 -0
  103. ansys/systemcoupling/core/adaptor/api_25_1/parameter.py +20 -0
  104. ansys/systemcoupling/core/adaptor/api_25_1/parameter_child.py +60 -0
  105. ansys/systemcoupling/core/adaptor/api_25_1/partition_participants.py +138 -0
  106. ansys/systemcoupling/core/adaptor/api_25_1/properties.py +36 -0
  107. ansys/systemcoupling/core/adaptor/api_25_1/record_interactions.py +46 -0
  108. ansys/systemcoupling/core/adaptor/api_25_1/reference_frame.py +20 -0
  109. ansys/systemcoupling/core/adaptor/api_25_1/reference_frame_child.py +71 -0
  110. ansys/systemcoupling/core/adaptor/api_25_1/region.py +20 -0
  111. ansys/systemcoupling/core/adaptor/api_25_1/region_child.py +71 -0
  112. ansys/systemcoupling/core/adaptor/api_25_1/reload_expression_function_modules.py +14 -0
  113. ansys/systemcoupling/core/adaptor/api_25_1/results.py +89 -0
  114. ansys/systemcoupling/core/adaptor/api_25_1/save.py +51 -0
  115. ansys/systemcoupling/core/adaptor/api_25_1/save_snapshot.py +54 -0
  116. ansys/systemcoupling/core/adaptor/api_25_1/setup_root.py +259 -0
  117. ansys/systemcoupling/core/adaptor/api_25_1/show_plot.py +75 -0
  118. ansys/systemcoupling/core/adaptor/api_25_1/shutdown.py +25 -0
  119. ansys/systemcoupling/core/adaptor/api_25_1/side.py +20 -0
  120. ansys/systemcoupling/core/adaptor/api_25_1/side_child.py +56 -0
  121. ansys/systemcoupling/core/adaptor/api_25_1/solution_control.py +115 -0
  122. ansys/systemcoupling/core/adaptor/api_25_1/solution_root.py +122 -0
  123. ansys/systemcoupling/core/adaptor/api_25_1/solve.py +30 -0
  124. ansys/systemcoupling/core/adaptor/api_25_1/stabilization.py +157 -0
  125. ansys/systemcoupling/core/adaptor/api_25_1/start_participants.py +47 -0
  126. ansys/systemcoupling/core/adaptor/api_25_1/step.py +57 -0
  127. ansys/systemcoupling/core/adaptor/api_25_1/transformation.py +21 -0
  128. ansys/systemcoupling/core/adaptor/api_25_1/transformation_child.py +62 -0
  129. ansys/systemcoupling/core/adaptor/api_25_1/type.py +39 -0
  130. ansys/systemcoupling/core/adaptor/api_25_1/unmapped_value_options.py +158 -0
  131. ansys/systemcoupling/core/adaptor/api_25_1/update_control.py +43 -0
  132. ansys/systemcoupling/core/adaptor/api_25_1/update_participant.py +61 -0
  133. ansys/systemcoupling/core/adaptor/api_25_1/variable.py +20 -0
  134. ansys/systemcoupling/core/adaptor/api_25_1/variable_child.py +231 -0
  135. ansys/systemcoupling/core/adaptor/api_25_1/write_csv_chart_files.py +21 -0
  136. ansys/systemcoupling/core/adaptor/api_25_1/write_ensight.py +46 -0
  137. ansys/systemcoupling/core/adaptor/impl/injected_commands.py +2 -0
  138. ansys/systemcoupling/core/client/syc_container.py +12 -0
  139. ansys/systemcoupling/core/examples/downloads.py +17 -26
  140. ansys/systemcoupling/core/session.py +19 -5
  141. ansys/systemcoupling/core/util/file_transfer.py +13 -3
  142. {ansys_systemcoupling_core-0.6.dist-info → ansys_systemcoupling_core-0.7.0.dist-info}/METADATA +16 -17
  143. {ansys_systemcoupling_core-0.6.dist-info → ansys_systemcoupling_core-0.7.0.dist-info}/RECORD +145 -35
  144. {ansys_systemcoupling_core-0.6.dist-info → ansys_systemcoupling_core-0.7.0.dist-info}/LICENSE +0 -0
  145. {ansys_systemcoupling_core-0.6.dist-info → ansys_systemcoupling_core-0.7.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,231 @@
1
+ #
2
+ # This is an auto-generated file. DO NOT EDIT!
3
+ #
4
+
5
+ from ansys.systemcoupling.core.adaptor.impl.types import *
6
+
7
+ from .attribute import attribute
8
+
9
+
10
+ class variable_child(Container):
11
+ """
12
+ Configure a variable for the coupling participant.
13
+ """
14
+
15
+ syc_name = "child_object_type"
16
+
17
+ child_names = ["attribute"]
18
+
19
+ attribute: attribute = attribute
20
+ """
21
+ attribute child of variable_child.
22
+ """
23
+ property_names_types = [
24
+ ("quantity_type", "QuantityType", "str"),
25
+ ("location", "Location", "str"),
26
+ ("participant_display_name", "ParticipantDisplayName", "str"),
27
+ ("display_name", "DisplayName", "str"),
28
+ ("data_type", "DataType", "str"),
29
+ ("real_initial_value", "RealInitialValue", "RealType"),
30
+ ("integer_initial_value", "IntegerInitialValue", "int"),
31
+ ("logical_initial_value", "LogicalInitialValue", "bool"),
32
+ ("string_initial_value", "StringInitialValue", "str"),
33
+ ("enumeration_initial_value", "EnumerationInitialValue", "int"),
34
+ ("real_min", "RealMin", "RealType"),
35
+ ("real_max", "RealMax", "RealType"),
36
+ ("integer_min", "IntegerMin", "int"),
37
+ ("integer_max", "IntegerMax", "int"),
38
+ ("enumeration_min", "EnumerationMin", "int"),
39
+ ("enumeration_max", "EnumerationMax", "int"),
40
+ ("tensor_type", "TensorType", "str"),
41
+ ("is_extensive", "IsExtensive", "bool"),
42
+ ]
43
+
44
+ @property
45
+ def quantity_type(self) -> str:
46
+ """Quantity type of the variable.
47
+
48
+ Allowed values:
49
+
50
+ - \"Unspecified\"
51
+ - \"Force\"
52
+ - \"Incremental Displacement\"
53
+ - \"Temperature\"
54
+ - \"Heat Rate\"
55
+ - \"Heat Transfer Coefficient\"
56
+ - \"Convection Reference Temperature\"
57
+ - \"Mode Shape\"
58
+ - \"Electrical Conductivity\" """
59
+ return self.get_property_state("quantity_type")
60
+
61
+ @quantity_type.setter
62
+ def quantity_type(self, value: str):
63
+ self.set_property_state("quantity_type", value)
64
+
65
+ @property
66
+ def location(self) -> str:
67
+ """Data location of the variable (\"Node\" or \"Element\")."""
68
+ return self.get_property_state("location")
69
+
70
+ @location.setter
71
+ def location(self, value: str):
72
+ self.set_property_state("location", value)
73
+
74
+ @property
75
+ def participant_display_name(self) -> str:
76
+ """Variable's display name as defined by the participant solver."""
77
+ return self.get_property_state("participant_display_name")
78
+
79
+ @participant_display_name.setter
80
+ def participant_display_name(self, value: str):
81
+ self.set_property_state("participant_display_name", value)
82
+
83
+ @property
84
+ def display_name(self) -> str:
85
+ """Variable's display name as defined in System Coupling."""
86
+ return self.get_property_state("display_name")
87
+
88
+ @display_name.setter
89
+ def display_name(self, value: str):
90
+ self.set_property_state("display_name", value)
91
+
92
+ @property
93
+ def data_type(self) -> str:
94
+ """Variable's data type as reported by the participant.
95
+
96
+ Allowed values (non-FMU case):
97
+
98
+ - Real
99
+ - Complex
100
+
101
+ Allowed values (FMU):
102
+
103
+ - Real
104
+ - Integer
105
+ - Logical
106
+ - String
107
+ - Enumeration"""
108
+ return self.get_property_state("data_type")
109
+
110
+ @data_type.setter
111
+ def data_type(self, value: str):
112
+ self.set_property_state("data_type", value)
113
+
114
+ @property
115
+ def real_initial_value(self) -> RealType:
116
+ """Real data start value."""
117
+ return self.get_property_state("real_initial_value")
118
+
119
+ @real_initial_value.setter
120
+ def real_initial_value(self, value: RealType):
121
+ self.set_property_state("real_initial_value", value)
122
+
123
+ @property
124
+ def integer_initial_value(self) -> int:
125
+ """Integer data start value."""
126
+ return self.get_property_state("integer_initial_value")
127
+
128
+ @integer_initial_value.setter
129
+ def integer_initial_value(self, value: int):
130
+ self.set_property_state("integer_initial_value", value)
131
+
132
+ @property
133
+ def logical_initial_value(self) -> bool:
134
+ """Logical data start value."""
135
+ return self.get_property_state("logical_initial_value")
136
+
137
+ @logical_initial_value.setter
138
+ def logical_initial_value(self, value: bool):
139
+ self.set_property_state("logical_initial_value", value)
140
+
141
+ @property
142
+ def string_initial_value(self) -> str:
143
+ """String data start value."""
144
+ return self.get_property_state("string_initial_value")
145
+
146
+ @string_initial_value.setter
147
+ def string_initial_value(self, value: str):
148
+ self.set_property_state("string_initial_value", value)
149
+
150
+ @property
151
+ def enumeration_initial_value(self) -> int:
152
+ """Enumeration data start value."""
153
+ return self.get_property_state("enumeration_initial_value")
154
+
155
+ @enumeration_initial_value.setter
156
+ def enumeration_initial_value(self, value: int):
157
+ self.set_property_state("enumeration_initial_value", value)
158
+
159
+ @property
160
+ def real_min(self) -> RealType:
161
+ """Real data minimum value."""
162
+ return self.get_property_state("real_min")
163
+
164
+ @real_min.setter
165
+ def real_min(self, value: RealType):
166
+ self.set_property_state("real_min", value)
167
+
168
+ @property
169
+ def real_max(self) -> RealType:
170
+ """Real data maximum value."""
171
+ return self.get_property_state("real_max")
172
+
173
+ @real_max.setter
174
+ def real_max(self, value: RealType):
175
+ self.set_property_state("real_max", value)
176
+
177
+ @property
178
+ def integer_min(self) -> int:
179
+ """Integer data minimum value."""
180
+ return self.get_property_state("integer_min")
181
+
182
+ @integer_min.setter
183
+ def integer_min(self, value: int):
184
+ self.set_property_state("integer_min", value)
185
+
186
+ @property
187
+ def integer_max(self) -> int:
188
+ """Integer data maximum value."""
189
+ return self.get_property_state("integer_max")
190
+
191
+ @integer_max.setter
192
+ def integer_max(self, value: int):
193
+ self.set_property_state("integer_max", value)
194
+
195
+ @property
196
+ def enumeration_min(self) -> int:
197
+ """Enumeration data minimum value."""
198
+ return self.get_property_state("enumeration_min")
199
+
200
+ @enumeration_min.setter
201
+ def enumeration_min(self, value: int):
202
+ self.set_property_state("enumeration_min", value)
203
+
204
+ @property
205
+ def enumeration_max(self) -> int:
206
+ """Enumeration data maximum value."""
207
+ return self.get_property_state("enumeration_max")
208
+
209
+ @enumeration_max.setter
210
+ def enumeration_max(self, value: int):
211
+ self.set_property_state("enumeration_max", value)
212
+
213
+ @property
214
+ def tensor_type(self) -> str:
215
+ """Indicates the variable tensor type (\"Scalar\" or \"Vector\").
216
+
217
+ \"Vector\" is not supported for the FMU case."""
218
+ return self.get_property_state("tensor_type")
219
+
220
+ @tensor_type.setter
221
+ def tensor_type(self, value: str):
222
+ self.set_property_state("tensor_type", value)
223
+
224
+ @property
225
+ def is_extensive(self) -> bool:
226
+ """Indicates whether this is an extensive property."""
227
+ return self.get_property_state("is_extensive")
228
+
229
+ @is_extensive.setter
230
+ def is_extensive(self, value: bool):
231
+ self.set_property_state("is_extensive", value)
@@ -0,0 +1,21 @@
1
+ #
2
+ # This is an auto-generated file. DO NOT EDIT!
3
+ #
4
+
5
+ from ansys.systemcoupling.core.adaptor.impl.types import *
6
+
7
+
8
+ class write_csv_chart_files(Command):
9
+ """
10
+ For each coupling interface, exports a CSV file containing chart data
11
+ (convergence and source/target quantity transfer values) for
12
+ that interface.
13
+
14
+ Each file is named according to the convention ``<interface>.csv``, where
15
+ ``<interface>`` is the object name of the corresponding coupling interface.
16
+
17
+ This command will overwrite any CSV charting files that already exist,
18
+ including any that were written during the solution.
19
+ """
20
+
21
+ syc_name = "WriteCsvChartFiles"
@@ -0,0 +1,46 @@
1
+ #
2
+ # This is an auto-generated file. DO NOT EDIT!
3
+ #
4
+
5
+ from ansys.systemcoupling.core.adaptor.impl.types import *
6
+
7
+
8
+ class write_ensight(Command):
9
+ """
10
+ Write a file with mesh and results which can be loaded into Ensight for
11
+ post processing.
12
+
13
+ Parameters
14
+ ----------
15
+ file_name : str
16
+ Base name for Ensight files. It will generate <base>.encas file which
17
+ should be loaded into Ensight. Other files are generated for geometry
18
+ and variables.
19
+ binary : bool, optional
20
+ To control if file is to be written in binary format or ASCII. ASCII
21
+ slows down performance, but may be useful for debugging and seeing
22
+ raw data.
23
+
24
+ """
25
+
26
+ syc_name = "WriteEnSight"
27
+
28
+ argument_names = ["file_name", "binary"]
29
+
30
+ class file_name(String):
31
+ """
32
+ Base name for Ensight files. It will generate <base>.encas file which
33
+ should be loaded into Ensight. Other files are generated for geometry
34
+ and variables.
35
+ """
36
+
37
+ syc_name = "FileName"
38
+
39
+ class binary(Boolean):
40
+ """
41
+ To control if file is to be written in binary format or ASCII. ASCII
42
+ slows down performance, but may be useful for debugging and seeing
43
+ raw data.
44
+ """
45
+
46
+ syc_name = "Binary"
@@ -149,6 +149,8 @@ def _wrap_add_participant(
149
149
 
150
150
  if input_file := kwargs.get("input_file", None):
151
151
  session.upload_file(input_file)
152
+ if os.path.dirname(input_file):
153
+ kwargs["input_file"] = os.path.basename(input_file)
152
154
 
153
155
  return setup._add_participant(**kwargs)
154
156
 
@@ -76,6 +76,18 @@ def start_container(
76
76
  f"ghcr.io/ansys/pysystem-coupling:{image_tag}",
77
77
  ] + args
78
78
 
79
+ container_user = os.getenv("SYC_CONTAINER_USER")
80
+ if container_user:
81
+ idx = run_args.index("-p")
82
+ run_args.insert(idx, container_user)
83
+ run_args.insert(idx, "--user")
84
+
85
+ license_server = os.getenv("ANSYSLMD_LICENSE_FILE")
86
+ if license_server:
87
+ idx = run_args.index("-e")
88
+ run_args.insert(idx, f"ANSYSLMD_LICENSE_FILE={license_server}")
89
+ run_args.insert(idx, "-e")
90
+
79
91
  if network:
80
92
  idx = run_args.index("-p")
81
93
  run_args.insert(idx, network)
@@ -32,6 +32,7 @@ Examples
32
32
  """
33
33
 
34
34
  import os
35
+ import pathlib
35
36
  import shutil
36
37
  from typing import Optional
37
38
  import urllib.request
@@ -67,12 +68,19 @@ def _get_file_url(filename: str, directory: Optional[str] = None) -> str:
67
68
  return f"{root_url}/{filename}"
68
69
 
69
70
 
70
- def _retrieve_file(url: str, filename: str):
71
+ def _retrieve_file(url: str, filename: str, download_to_cwd: bool = False):
72
+
73
+ name_to_return = lambda local_path: (
74
+ local_path if not download_to_cwd else pathlib.Path(local_path).name
75
+ )
76
+
77
+ download_target_dir = "." if download_to_cwd else pysyc.EXAMPLES_PATH
78
+
71
79
  # First check if file has already been downloaded
72
- local_path = os.path.join(pysyc.EXAMPLES_PATH, os.path.basename(filename))
80
+ local_path = os.path.join(download_target_dir, os.path.basename(filename))
73
81
  local_path_no_zip = local_path.replace(".zip", "")
74
82
  if os.path.isfile(local_path_no_zip) or os.path.isdir(local_path_no_zip):
75
- return local_path_no_zip, None
83
+ return name_to_return(local_path_no_zip), None
76
84
 
77
85
  # grab the correct url retriever
78
86
  urlretrieve = urllib.request.urlretrieve
@@ -83,30 +91,13 @@ def _retrieve_file(url: str, filename: str):
83
91
  if get_ext(local_path) in [".zip"]:
84
92
  _decompress(local_path)
85
93
  local_path = local_path[:-4]
86
- return local_path, resp
87
-
88
-
89
- def _temp_get_file(filename: str, directory: Optional[str] = None):
90
- example_dir = os.environ.get("PYSYC_EXAMPLE_DIR")
91
- if example_dir is None:
92
- raise Exception(
93
- "PYSYC_EXAMPLE_DIR is not set. "
94
- "(This is a temporary requirement during development.)"
95
- )
96
- local_path = os.path.join(pysyc.EXAMPLES_PATH, os.path.basename(filename))
97
- local_path_no_zip = local_path.replace(".zip", "")
98
- if os.path.isfile(local_path_no_zip) or os.path.isdir(local_path_no_zip):
99
- return local_path_no_zip
100
-
101
- file_path = os.path.join(example_dir, directory, filename)
102
- shutil.copy(file_path, local_path)
103
- if get_ext(local_path) in [".zip"]:
104
- _decompress(local_path)
105
- local_path = local_path[:-4]
106
- return local_path
94
+ return name_to_return(local_path), resp
107
95
 
108
96
 
109
97
  def download_file(filename: str, directory: Optional[str] = None):
110
98
  url = _get_file_url(filename, directory)
111
- return _retrieve_file(url, filename)[0]
112
- # return _temp_get_file(filename, directory)
99
+ download_to_cwd = (
100
+ os.getenv("PYSYC_BUILD_SPHINX_GALLERY") == "1"
101
+ and os.getenv("SYC_LAUNCH_CONTAINER") == "1"
102
+ )
103
+ return _retrieve_file(url, filename, download_to_cwd)[0]
@@ -138,13 +138,23 @@ class Session:
138
138
  self.__rpc.start_output(handle_output)
139
139
 
140
140
  def end_output(self) -> None:
141
- """Cancels output streaming previously started by the ``start_output`` method."""
141
+ """Cancel output streaming previously started by the ``start_output`` method."""
142
142
  self.__rpc.end_output()
143
143
 
144
144
  def ping(self) -> bool:
145
145
  """Simple test that the server is alive and responding."""
146
146
  return self.__rpc.ping()
147
147
 
148
+ @property
149
+ def version(self) -> str:
150
+ """Return the server version as a string.
151
+
152
+ The version string is in the form of dot-separated major and minor
153
+ version numbers. For example, "24.2".
154
+ """
155
+ # Internal version string is in '_'-separated form as that is what is used elsewhere.
156
+ return self._get_version().replace("_", ".")
157
+
148
158
  @property
149
159
  def case(self) -> case_root:
150
160
  """Pythonic client-side form of the System Coupling case persistence API."""
@@ -168,14 +178,18 @@ class Session:
168
178
  )
169
179
  return self.__solution_root
170
180
 
181
+ def _get_version(self):
182
+ if self.__syc_version is None:
183
+ proxy = SycProxy(self.__rpc)
184
+ version = proxy.get_version()
185
+ self.__syc_version = version.replace(".", "_")
186
+ return self.__syc_version
187
+
171
188
  def _get_api_root(self, category):
172
189
  if isinstance(self.__rpc, _DefunctRpcImpl):
173
190
  self.__rpc.trigger_error
174
191
  sycproxy = SycProxy(self.__rpc)
175
- if self.__syc_version is None:
176
- version = sycproxy.get_version()
177
- self.__syc_version = version.replace(".", "_")
178
- root = get_root(sycproxy, category=category, version=self.__syc_version)
192
+ root = get_root(sycproxy, category=category, version=self._get_version())
179
193
  if self.__part_mgr is None:
180
194
  self.__part_mgr = ParticipantManager(self, self.__syc_version)
181
195
  sycproxy.set_injected_commands(
@@ -21,6 +21,7 @@
21
21
  # SOFTWARE.
22
22
 
23
23
  import os
24
+ import shutil
24
25
  from typing import Any, Optional, Protocol
25
26
 
26
27
 
@@ -88,13 +89,22 @@ class PimFileTransferService: # pragma: no cover
88
89
  """
89
90
  if os.path.isfile(file_name):
90
91
  remote_file_name = remote_file_name or os.path.basename(file_name)
92
+ delete_copy = False
91
93
  if os.path.dirname(file_name):
92
- raise IsADirectoryError(
93
- f"{remote_file_name} is not in the current working directory"
94
- )
94
+ base_filename = os.path.basename(file_name)
95
+ dst_file = base_filename
96
+ dst_file_footer = 0
97
+ while os.path.exists(dst_file):
98
+ dst_file_footer += 1
99
+ dst_file = f"{base_filename}_{dst_file_footer}"
100
+ shutil.copy2(file_name, dst_file)
101
+ delete_copy = True
102
+ file_name = dst_file
95
103
  if not overwrite and self.file_service.file_exist(remote_file_name):
96
104
  raise FileExistsError(f"{remote_file_name} already exists remotely.")
97
105
  self.file_service.upload_file(file_name, remote_file_name)
106
+ if delete_copy:
107
+ os.remove(file_name)
98
108
  else:
99
109
  raise FileNotFoundError(f"Local file {file_name} does not exist.")
100
110
 
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ansys-systemcoupling-core
3
- Version: 0.6
3
+ Version: 0.7.0
4
4
  Summary: A Python wrapper for Ansys System Coupling.
5
5
  Author-email: "ANSYS, Inc." <pyansys.support@ansys.com>
6
6
  Maintainer-email: PyAnsys developers <pyansys.maintainers@ansys.com>
7
- Requires-Python: >=3.9,<3.13
7
+ Requires-Python: >=3.10,<3.13
8
8
  Description-Content-Type: text/x-rst
9
9
  Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Intended Audience :: Science/Research
@@ -13,42 +13,41 @@ Classifier: License :: OSI Approved :: MIT License
13
13
  Classifier: Operating System :: Microsoft :: Windows
14
14
  Classifier: Operating System :: POSIX
15
15
  Classifier: Operating System :: MacOS
16
- Classifier: Programming Language :: Python :: 3.9
17
16
  Classifier: Programming Language :: Python :: 3.10
18
17
  Classifier: Programming Language :: Python :: 3.11
19
18
  Classifier: Programming Language :: Python :: 3.12
20
- Requires-Dist: ansys-api-systemcoupling==0.1.0
19
+ Requires-Dist: ansys-api-systemcoupling==0.2.0
21
20
  Requires-Dist: ansys-platform-instancemanagement~=1.0
22
21
  Requires-Dist: grpcio>=1.30.0
23
- Requires-Dist: grpcio-status>=1.30.0,<1.64.2
22
+ Requires-Dist: grpcio-status>=1.30.0,<1.66.2
24
23
  Requires-Dist: googleapis-common-protos>=1.50.0
25
- Requires-Dist: protobuf>=3.20.1,<4.0.0
26
24
  Requires-Dist: psutil>=5.7.0
27
25
  Requires-Dist: pyyaml
28
26
  Requires-Dist: appdirs>=1.4.0
29
27
  Requires-Dist: importlib-metadata>=4.0
30
28
  Requires-Dist: matplotlib>=3.8.2
31
29
  Requires-Dist: build ; extra == "build"
32
- Requires-Dist: black==24.4.2 ; extra == "classesgen"
30
+ Requires-Dist: black==24.8.0 ; extra == "classesgen"
33
31
  Requires-Dist: isort==5.13.2 ; extra == "classesgen"
34
- Requires-Dist: ansys-sphinx-theme==0.16.6 ; extra == "doc"
32
+ Requires-Dist: ansys-sphinx-theme==1.0.7 ; extra == "doc"
35
33
  Requires-Dist: jupyter_sphinx==0.5.3 ; extra == "doc"
36
34
  Requires-Dist: matplotlib ; extra == "doc"
37
- Requires-Dist: numpydoc==1.7.0 ; extra == "doc"
35
+ Requires-Dist: numpydoc==1.8.0 ; extra == "doc"
38
36
  Requires-Dist: pypandoc==1.13 ; extra == "doc"
39
37
  Requires-Dist: pytest-sphinx==0.6.3 ; extra == "doc"
40
- Requires-Dist: Sphinx==7.3.7 ; extra == "doc"
38
+ Requires-Dist: Sphinx==8.0.2 ; extra == "doc"
41
39
  Requires-Dist: sphinx-autobuild==2024.4.16 ; extra == "doc"
42
- Requires-Dist: sphinx-autodoc-typehints==2.2.2 ; extra == "doc"
40
+ Requires-Dist: sphinx-autodoc-typehints==2.3.0 ; extra == "doc"
43
41
  Requires-Dist: sphinx-copybutton==0.5.2 ; extra == "doc"
44
- Requires-Dist: sphinx-gallery==0.16.0 ; extra == "doc"
45
- Requires-Dist: sphinx-notfound-page==1.0.2 ; extra == "doc"
46
- Requires-Dist: sphinxcontrib-websupport==1.2.7 ; extra == "doc"
42
+ Requires-Dist: sphinx-gallery==0.17.1 ; extra == "doc"
43
+ Requires-Dist: sphinx-notfound-page==1.0.4 ; extra == "doc"
44
+ Requires-Dist: sphinxcontrib-websupport==2.0.0 ; extra == "doc"
47
45
  Requires-Dist: sphinxemoji==0.3.1 ; extra == "doc"
48
- Requires-Dist: ansys-fluent-core ; extra == "doc"
49
- Requires-Dist: ansys-dpf-core ; extra == "doc"
46
+ Requires-Dist: ansys-fluent-core==0.24.2 ; extra == "doc"
47
+ Requires-Dist: ansys-dpf-core==0.13.0 ; extra == "doc"
48
+ Requires-Dist: ansys-mapdl-core==0.68.4 ; extra == "doc"
50
49
  Requires-Dist: codespell==2.3.0 ; extra == "style"
51
- Requires-Dist: flake8==7.1.0 ; extra == "style"
50
+ Requires-Dist: flake8==7.1.1 ; extra == "style"
52
51
  Requires-Dist: pytest ; extra == "tests"
53
52
  Requires-Dist: pytest-cov ; extra == "tests"
54
53
  Requires-Dist: psutil>=5.7.0 ; extra == "tests"