1414class elemental_mean_fc (Operator ):
1515 """Computes the average of a multi-entity container of fields,
1616 (ElementalNodal -> Elemental), (NodalElemental -> Nodal). If the
17- input fields are mixed shell/solid and collapseShellLayers is not
18- specified, then the fields are split by element shape and the
19- output fields container has an elshape label.
17+ input fields are mixed shell/solid and collapseShellLayers is
18+ false, then the fields could be split by element shape and the
19+ output fields container would have an elshape label depending on
20+ the e_shell_layer and merge_solid_shell inputs (if e_shell_layer
21+ is not specified, the fields are split; if it is specified, the
22+ fields can be split based on merge_solid_shell).If
23+ collapseShellLayers is true, all available shell layers are
24+ collapsed and shells and solid fields are always merged.
2025
2126 Parameters
2227 ----------
2328 fields_container : FieldsContainer
2429 collapse_shell_layers : bool, optional
25- If true, shell layers are averaged as well
26- (default is false).
30+ If true, the data across different shell
31+ layers is averaged as well (default
32+ is false).
2733 force_averaging : bool, optional
2834 If true you average, if false you just sum.
29- scoping : Scoping, optional
35+ scoping : Scoping or ScopingsContainer , optional
3036 Average only on these elements. if it is a
3137 scoping container, the label must
3238 correspond to the one of the fields
33- containers .
34- abstract_meshed_region : MeshedRegion, optional
39+ container .
40+ abstract_meshed_region : MeshedRegion or MeshesContainer , optional
3541 The mesh region in this pin is used to
3642 perform the averaging. it is used if
3743 there is no fields support.
44+ merge_solid_shell : bool, optional
45+ For shell/solid mixed fields, group in the
46+ same field all solids and shells
47+ (false by default). this pin only has
48+ an effect when collapse_shell_layers
49+ is false and a value for
50+ e_shell_layer is provided.
51+ e_shell_layer : int, optional
52+ 0: top, 1: bottom, 2: bottomtop, 3: mid, 4:
53+ bottomtopmid. this pin only has an
54+ effect when collapse_shell_layers is
55+ false.
3856
3957 Returns
4058 -------
@@ -58,6 +76,10 @@ class elemental_mean_fc(Operator):
5876 >>> op.inputs.scoping.connect(my_scoping)
5977 >>> my_abstract_meshed_region = dpf.MeshedRegion()
6078 >>> op.inputs.abstract_meshed_region.connect(my_abstract_meshed_region)
79+ >>> my_merge_solid_shell = bool()
80+ >>> op.inputs.merge_solid_shell.connect(my_merge_solid_shell)
81+ >>> my_e_shell_layer = int()
82+ >>> op.inputs.e_shell_layer.connect(my_e_shell_layer)
6183
6284 >>> # Instantiate operator and connect inputs in one line
6385 >>> op = dpf.operators.averaging.elemental_mean_fc(
@@ -66,6 +88,8 @@ class elemental_mean_fc(Operator):
6688 ... force_averaging=my_force_averaging,
6789 ... scoping=my_scoping,
6890 ... abstract_meshed_region=my_abstract_meshed_region,
91+ ... merge_solid_shell=my_merge_solid_shell,
92+ ... e_shell_layer=my_e_shell_layer,
6993 ... )
7094
7195 >>> # Get output data
@@ -79,6 +103,8 @@ def __init__(
79103 force_averaging = None ,
80104 scoping = None ,
81105 abstract_meshed_region = None ,
106+ merge_solid_shell = None ,
107+ e_shell_layer = None ,
82108 config = None ,
83109 server = None ,
84110 ):
@@ -95,15 +121,25 @@ def __init__(
95121 self .inputs .scoping .connect (scoping )
96122 if abstract_meshed_region is not None :
97123 self .inputs .abstract_meshed_region .connect (abstract_meshed_region )
124+ if merge_solid_shell is not None :
125+ self .inputs .merge_solid_shell .connect (merge_solid_shell )
126+ if e_shell_layer is not None :
127+ self .inputs .e_shell_layer .connect (e_shell_layer )
98128
99129 @staticmethod
100130 def _spec ():
101131 description = """Computes the average of a multi-entity container of fields,
102132 (ElementalNodal -> Elemental), (NodalElemental -> Nodal).
103133 If the input fields are mixed shell/solid and
104- collapseShellLayers is not specified, then the fields are
105- split by element shape and the output fields container has
106- an elshape label."""
134+ collapseShellLayers is false, then the fields could be
135+ split by element shape and the output fields container
136+ would have an elshape label depending on the e_shell_layer
137+ and merge_solid_shell inputs (if e_shell_layer is not
138+ specified, the fields are split; if it is specified, the
139+ fields can be split based on merge_solid_shell).If
140+ collapseShellLayers is true, all available shell layers
141+ are collapsed and shells and solid fields are always
142+ merged."""
107143 spec = Specification (
108144 description = description ,
109145 map_input_pin_spec = {
@@ -117,8 +153,9 @@ def _spec():
117153 name = "collapse_shell_layers" ,
118154 type_names = ["bool" ],
119155 optional = True ,
120- document = """If true, shell layers are averaged as well
121- (default is false).""" ,
156+ document = """If true, the data across different shell
157+ layers is averaged as well (default
158+ is false).""" ,
122159 ),
123160 2 : PinSpecification (
124161 name = "force_averaging" ,
@@ -128,21 +165,41 @@ def _spec():
128165 ),
129166 3 : PinSpecification (
130167 name = "scoping" ,
131- type_names = ["scoping" ],
168+ type_names = ["scoping" , "scopings_container" ],
132169 optional = True ,
133170 document = """Average only on these elements. if it is a
134171 scoping container, the label must
135172 correspond to the one of the fields
136- containers .""" ,
173+ container .""" ,
137174 ),
138175 4 : PinSpecification (
139176 name = "abstract_meshed_region" ,
140- type_names = ["abstract_meshed_region" ],
177+ type_names = ["abstract_meshed_region" , "meshes_container" ],
141178 optional = True ,
142179 document = """The mesh region in this pin is used to
143180 perform the averaging. it is used if
144181 there is no fields support.""" ,
145182 ),
183+ 26 : PinSpecification (
184+ name = "merge_solid_shell" ,
185+ type_names = ["bool" ],
186+ optional = True ,
187+ document = """For shell/solid mixed fields, group in the
188+ same field all solids and shells
189+ (false by default). this pin only has
190+ an effect when collapse_shell_layers
191+ is false and a value for
192+ e_shell_layer is provided.""" ,
193+ ),
194+ 27 : PinSpecification (
195+ name = "e_shell_layer" ,
196+ type_names = ["int32" ],
197+ optional = True ,
198+ document = """0: top, 1: bottom, 2: bottomtop, 3: mid, 4:
199+ bottomtopmid. this pin only has an
200+ effect when collapse_shell_layers is
201+ false.""" ,
202+ ),
146203 },
147204 map_output_pin_spec = {
148205 0 : PinSpecification (
@@ -210,6 +267,10 @@ class InputsElementalMeanFc(_Inputs):
210267 >>> op.inputs.scoping.connect(my_scoping)
211268 >>> my_abstract_meshed_region = dpf.MeshedRegion()
212269 >>> op.inputs.abstract_meshed_region.connect(my_abstract_meshed_region)
270+ >>> my_merge_solid_shell = bool()
271+ >>> op.inputs.merge_solid_shell.connect(my_merge_solid_shell)
272+ >>> my_e_shell_layer = int()
273+ >>> op.inputs.e_shell_layer.connect(my_e_shell_layer)
213274 """
214275
215276 def __init__ (self , op : Operator ):
@@ -230,6 +291,12 @@ def __init__(self, op: Operator):
230291 elemental_mean_fc ._spec ().input_pin (4 ), 4 , op , - 1
231292 )
232293 self ._inputs .append (self ._abstract_meshed_region )
294+ self ._merge_solid_shell = Input (
295+ elemental_mean_fc ._spec ().input_pin (26 ), 26 , op , - 1
296+ )
297+ self ._inputs .append (self ._merge_solid_shell )
298+ self ._e_shell_layer = Input (elemental_mean_fc ._spec ().input_pin (27 ), 27 , op , - 1 )
299+ self ._inputs .append (self ._e_shell_layer )
233300
234301 @property
235302 def fields_container (self ):
@@ -253,8 +320,9 @@ def fields_container(self):
253320 def collapse_shell_layers (self ):
254321 """Allows to connect collapse_shell_layers input to the operator.
255322
256- If true, shell layers are averaged as well
257- (default is false).
323+ If true, the data across different shell
324+ layers is averaged as well (default
325+ is false).
258326
259327 Parameters
260328 ----------
@@ -297,11 +365,11 @@ def scoping(self):
297365 Average only on these elements. if it is a
298366 scoping container, the label must
299367 correspond to the one of the fields
300- containers .
368+ container .
301369
302370 Parameters
303371 ----------
304- my_scoping : Scoping
372+ my_scoping : Scoping or ScopingsContainer
305373
306374 Examples
307375 --------
@@ -323,7 +391,7 @@ def abstract_meshed_region(self):
323391
324392 Parameters
325393 ----------
326- my_abstract_meshed_region : MeshedRegion
394+ my_abstract_meshed_region : MeshedRegion or MeshesContainer
327395
328396 Examples
329397 --------
@@ -335,6 +403,54 @@ def abstract_meshed_region(self):
335403 """
336404 return self ._abstract_meshed_region
337405
406+ @property
407+ def merge_solid_shell (self ):
408+ """Allows to connect merge_solid_shell input to the operator.
409+
410+ For shell/solid mixed fields, group in the
411+ same field all solids and shells
412+ (false by default). this pin only has
413+ an effect when collapse_shell_layers
414+ is false and a value for
415+ e_shell_layer is provided.
416+
417+ Parameters
418+ ----------
419+ my_merge_solid_shell : bool
420+
421+ Examples
422+ --------
423+ >>> from ansys.dpf import core as dpf
424+ >>> op = dpf.operators.averaging.elemental_mean_fc()
425+ >>> op.inputs.merge_solid_shell.connect(my_merge_solid_shell)
426+ >>> # or
427+ >>> op.inputs.merge_solid_shell(my_merge_solid_shell)
428+ """
429+ return self ._merge_solid_shell
430+
431+ @property
432+ def e_shell_layer (self ):
433+ """Allows to connect e_shell_layer input to the operator.
434+
435+ 0: top, 1: bottom, 2: bottomtop, 3: mid, 4:
436+ bottomtopmid. this pin only has an
437+ effect when collapse_shell_layers is
438+ false.
439+
440+ Parameters
441+ ----------
442+ my_e_shell_layer : int
443+
444+ Examples
445+ --------
446+ >>> from ansys.dpf import core as dpf
447+ >>> op = dpf.operators.averaging.elemental_mean_fc()
448+ >>> op.inputs.e_shell_layer.connect(my_e_shell_layer)
449+ >>> # or
450+ >>> op.inputs.e_shell_layer(my_e_shell_layer)
451+ """
452+ return self ._e_shell_layer
453+
338454
339455class OutputsElementalMeanFc (_Outputs ):
340456 """Intermediate class used to get outputs from
0 commit comments