@@ -26,6 +26,8 @@ class rotate_in_cylindrical_cs(Operator):
26
26
3-3 rotation matrix and origin coordinates
27
27
must be set here to define a
28
28
coordinate system.
29
+ mesh : MeshedRegion, optional
30
+ Mesh support of the input field
29
31
30
32
31
33
Examples
@@ -40,25 +42,32 @@ class rotate_in_cylindrical_cs(Operator):
40
42
>>> op.inputs.field.connect(my_field)
41
43
>>> my_coordinate_system = dpf.Field()
42
44
>>> op.inputs.coordinate_system.connect(my_coordinate_system)
45
+ >>> my_mesh = dpf.MeshedRegion()
46
+ >>> op.inputs.mesh.connect(my_mesh)
43
47
44
48
>>> # Instantiate operator and connect inputs in one line
45
49
>>> op = dpf.operators.geo.rotate_in_cylindrical_cs(
46
50
... field=my_field,
47
51
... coordinate_system=my_coordinate_system,
52
+ ... mesh=my_mesh,
48
53
... )
49
54
50
55
>>> # Get output data
51
- >>> result_fields_container = op.outputs.fields_container ()
56
+ >>> result_field = op.outputs.field ()
52
57
"""
53
58
54
- def __init__ (self , field = None , coordinate_system = None , config = None , server = None ):
59
+ def __init__ (
60
+ self , field = None , coordinate_system = None , mesh = None , config = None , server = None
61
+ ):
55
62
super ().__init__ (name = "transform_cylindricalCS" , config = config , server = server )
56
63
self ._inputs = InputsRotateInCylindricalCs (self )
57
64
self ._outputs = OutputsRotateInCylindricalCs (self )
58
65
if field is not None :
59
66
self .inputs .field .connect (field )
60
67
if coordinate_system is not None :
61
68
self .inputs .coordinate_system .connect (coordinate_system )
69
+ if mesh is not None :
70
+ self .inputs .mesh .connect (mesh )
62
71
63
72
@staticmethod
64
73
def _spec ():
@@ -85,11 +94,17 @@ def _spec():
85
94
must be set here to define a
86
95
coordinate system.""" ,
87
96
),
97
+ 2 : PinSpecification (
98
+ name = "mesh" ,
99
+ type_names = ["abstract_meshed_region" ],
100
+ optional = True ,
101
+ document = """Mesh support of the input field""" ,
102
+ ),
88
103
},
89
104
map_output_pin_spec = {
90
105
0 : PinSpecification (
91
- name = "fields_container " ,
92
- type_names = ["fields_container " ],
106
+ name = "field " ,
107
+ type_names = ["field " ],
93
108
optional = False ,
94
109
document = """""" ,
95
110
),
@@ -146,6 +161,8 @@ class InputsRotateInCylindricalCs(_Inputs):
146
161
>>> op.inputs.field.connect(my_field)
147
162
>>> my_coordinate_system = dpf.Field()
148
163
>>> op.inputs.coordinate_system.connect(my_coordinate_system)
164
+ >>> my_mesh = dpf.MeshedRegion()
165
+ >>> op.inputs.mesh.connect(my_mesh)
149
166
"""
150
167
151
168
def __init__ (self , op : Operator ):
@@ -156,6 +173,8 @@ def __init__(self, op: Operator):
156
173
rotate_in_cylindrical_cs ._spec ().input_pin (1 ), 1 , op , - 1
157
174
)
158
175
self ._inputs .append (self ._coordinate_system )
176
+ self ._mesh = Input (rotate_in_cylindrical_cs ._spec ().input_pin (2 ), 2 , op , - 1 )
177
+ self ._inputs .append (self ._mesh )
159
178
160
179
@property
161
180
def field (self ):
@@ -200,6 +219,26 @@ def coordinate_system(self):
200
219
"""
201
220
return self ._coordinate_system
202
221
222
+ @property
223
+ def mesh (self ):
224
+ """Allows to connect mesh input to the operator.
225
+
226
+ Mesh support of the input field
227
+
228
+ Parameters
229
+ ----------
230
+ my_mesh : MeshedRegion
231
+
232
+ Examples
233
+ --------
234
+ >>> from ansys.dpf import core as dpf
235
+ >>> op = dpf.operators.geo.rotate_in_cylindrical_cs()
236
+ >>> op.inputs.mesh.connect(my_mesh)
237
+ >>> # or
238
+ >>> op.inputs.mesh(my_mesh)
239
+ """
240
+ return self ._mesh
241
+
203
242
204
243
class OutputsRotateInCylindricalCs (_Outputs ):
205
244
"""Intermediate class used to get outputs from
@@ -210,29 +249,27 @@ class OutputsRotateInCylindricalCs(_Outputs):
210
249
>>> from ansys.dpf import core as dpf
211
250
>>> op = dpf.operators.geo.rotate_in_cylindrical_cs()
212
251
>>> # Connect inputs : op.inputs. ...
213
- >>> result_fields_container = op.outputs.fields_container ()
252
+ >>> result_field = op.outputs.field ()
214
253
"""
215
254
216
255
def __init__ (self , op : Operator ):
217
256
super ().__init__ (rotate_in_cylindrical_cs ._spec ().outputs , op )
218
- self ._fields_container = Output (
219
- rotate_in_cylindrical_cs ._spec ().output_pin (0 ), 0 , op
220
- )
221
- self ._outputs .append (self ._fields_container )
257
+ self ._field = Output (rotate_in_cylindrical_cs ._spec ().output_pin (0 ), 0 , op )
258
+ self ._outputs .append (self ._field )
222
259
223
260
@property
224
- def fields_container (self ):
225
- """Allows to get fields_container output of the operator
261
+ def field (self ):
262
+ """Allows to get field output of the operator
226
263
227
264
Returns
228
265
----------
229
- my_fields_container : FieldsContainer
266
+ my_field : Field
230
267
231
268
Examples
232
269
--------
233
270
>>> from ansys.dpf import core as dpf
234
271
>>> op = dpf.operators.geo.rotate_in_cylindrical_cs()
235
272
>>> # Connect inputs : op.inputs. ...
236
- >>> result_fields_container = op.outputs.fields_container ()
273
+ >>> result_field = op.outputs.field ()
237
274
""" # noqa: E501
238
- return self ._fields_container
275
+ return self ._field
0 commit comments