Skip to content

Commit e0485ca

Browse files
PProfizigithub-actions[bot]
authored andcommitted
update generated code
1 parent c3f1da6 commit e0485ca

File tree

5 files changed

+43
-1
lines changed

5 files changed

+43
-1
lines changed

doc/source/_static/dpf_operators.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14101,7 +14101,8 @@ <h2 class="h2-main">Configurating operators</h2>
1410114101
</div></td></tr></tbody></table></div><h2 class="op-des-h2">Outputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="fields"></pin-name></td><td><req-type typeName="(property_fields_container | property_field)"></req-type></td></tr></tbody></table></div><h2 class="op-des-h2">Configurations</h2><config-spec name="mutex" default="false" doc="If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads." types="bool" ></config-spec><config-spec name="num_threads" default="0" doc="Number of threads to use to run in parallel" types="int32" ></config-spec><config-spec name="run_in_parallel" default="true" doc="Loops are allowed to run in parallel if the value of this config is set to true." types="bool" ></config-spec><h2 class="op-des-h2">Scripting</h2><scripting-part scripting_name="rescope_property_field" license="none" cat="scoping" plugin="core" cpp-name="Rescope_pf"></scripting-part><h2 class="op-des-h2">Changelog</h2><op-changelog content='{"0.0.0":"New"}'></op-changelog></div><div class="operator" id="elemental nodal to nodal elemental (field)" scripting_name="elemental_nodal_to_nodal_elemental"plugin="core"cat="averaging"><h1 class="op-des-h1">averaging: elemental nodal to nodal elemental (field)</h1><figure class="figure-op-des"> <figcaption > Description </figcaption><div class = "figure-op-des-text"><p>Transforms an Elemental Nodal field to Nodal Elemental. The result is computed on a given node's scoping.</p>
1410214102
</div></figure><div class="op-version">Version 0.0.0</div><h2 class="op-des-h2">Inputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="field"></pin-name></td><td><req-type typeName="(field | fields_container)"></req-type></td><td><div class = "pin-des-text"><p>field or fields container with only one field is expected</p>
1410314103
</div></td></tr></tbody></table><table class="pin-box"><tbody><tr><td><pin-number-optional n="1" ellipsis = "false"></pin-number-optional></td><td><pin-name name="mesh_scoping"></pin-name></td><td><req-type typeName="(scoping)"></req-type></td></tr></tbody></table></div><h2 class="op-des-h2">Outputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="field"></pin-name></td><td><req-type typeName="(field)"></req-type></td></tr></tbody></table></div><h2 class="op-des-h2">Configurations</h2><config-spec name="mutex" default="false" doc="If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads." types="bool" ></config-spec><h2 class="op-des-h2">Scripting</h2><scripting-part scripting_name="elemental_nodal_to_nodal_elemental" license="none" cat="averaging" plugin="core" cpp-name="ElementalNodal_To_NodalElemental"></scripting-part><h2 class="op-des-h2">Changelog</h2><op-changelog content='{"0.0.0":"New"}'></op-changelog></div><div class="operator" id="adapt with scopings container" scripting_name="adapt_with_scopings_container"plugin="core"cat="scoping"><h1 class="op-des-h1">scoping: adapt with scopings container</h1><figure class="figure-op-des"> <figcaption > Description </figcaption><div class = "figure-op-des-text"><p>Rescopes/splits a fields container to correspond to a scopings container.</p>
14104-
</div></figure><div class="op-version">Version 0.0.0</div><h2 class="op-des-h2">Inputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="field_or_fields_container"></pin-name></td><td><req-type typeName="(fields_container | field)"></req-type></td></tr></tbody></table><table class="pin-box"><tbody><tr><td><pin-number n="1" ellipsis = "false"></pin-number></td><td><pin-name name="scopings_container"></pin-name></td><td><req-type typeName="(scopings_container)"></req-type></td></tr></tbody></table></div><h2 class="op-des-h2">Outputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="fields_container"></pin-name></td><td><req-type typeName="(fields_container)"></req-type></td></tr></tbody></table></div><h2 class="op-des-h2">Configurations</h2><config-spec name="mutex" default="false" doc="If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads." types="bool" ></config-spec><config-spec name="num_threads" default="0" doc="Number of threads to use to run in parallel" types="int32" ></config-spec><config-spec name="run_in_parallel" default="true" doc="Loops are allowed to run in parallel if the value of this config is set to true." types="bool" ></config-spec><h2 class="op-des-h2">Scripting</h2><scripting-part scripting_name="adapt_with_scopings_container" license="none" cat="scoping" plugin="core" cpp-name="rescope_fc"></scripting-part><h2 class="op-des-h2">Changelog</h2><op-changelog content='{"0.0.0":"New"}'></op-changelog></div><div class="operator" id="nodes in mesh" scripting_name="nodal_from_mesh"plugin="core"cat="scoping"><h1 class="op-des-h1">scoping: nodes in mesh</h1><figure class="figure-op-des"> <figcaption > Description </figcaption><div class = "figure-op-des-text"><p>Retrieves the nodal scoping of a given input mesh, which contains the node IDs.</p>
14104+
</div></figure><div class="op-version">Version 0.0.0</div><h2 class="op-des-h2">Inputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="field_or_fields_container"></pin-name></td><td><req-type typeName="(fields_container | field)"></req-type></td></tr></tbody></table><table class="pin-box"><tbody><tr><td><pin-number n="1" ellipsis = "false"></pin-number></td><td><pin-name name="scopings_container"></pin-name></td><td><req-type typeName="(scopings_container)"></req-type></td></tr></tbody></table><table class="pin-box"><tbody><tr><td><pin-number-optional n="2" ellipsis = "false"></pin-number-optional></td><td><pin-name name="keep_empty_fields"></pin-name></td><td><req-type typeName="(bool)"></req-type></td><td><div class = "pin-des-text"><p>Default false.</p>
14105+
</div></td></tr></tbody></table></div><h2 class="op-des-h2">Outputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="fields_container"></pin-name></td><td><req-type typeName="(fields_container)"></req-type></td></tr></tbody></table></div><h2 class="op-des-h2">Configurations</h2><config-spec name="mutex" default="false" doc="If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads." types="bool" ></config-spec><config-spec name="num_threads" default="0" doc="Number of threads to use to run in parallel" types="int32" ></config-spec><config-spec name="run_in_parallel" default="true" doc="Loops are allowed to run in parallel if the value of this config is set to true." types="bool" ></config-spec><h2 class="op-des-h2">Scripting</h2><scripting-part scripting_name="adapt_with_scopings_container" license="none" cat="scoping" plugin="core" cpp-name="rescope_fc"></scripting-part><h2 class="op-des-h2">Changelog</h2><op-changelog content='{"0.0.0":"New"}'></op-changelog></div><div class="operator" id="nodes in mesh" scripting_name="nodal_from_mesh"plugin="core"cat="scoping"><h1 class="op-des-h1">scoping: nodes in mesh</h1><figure class="figure-op-des"> <figcaption > Description </figcaption><div class = "figure-op-des-text"><p>Retrieves the nodal scoping of a given input mesh, which contains the node IDs.</p>
1410514106
</div></figure><div class="op-version">Version 0.0.0</div><h2 class="op-des-h2">Inputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="mesh"></pin-name></td><td><req-type typeName="(abstract_meshed_region)"></req-type></td></tr></tbody></table></div><h2 class="op-des-h2">Outputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="mesh_scoping"></pin-name></td><td><req-type typeName="(scoping)"></req-type></td></tr></tbody></table></div><h2 class="op-des-h2">Configurations</h2><config-spec name="mutex" default="false" doc="If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads." types="bool" ></config-spec><h2 class="op-des-h2">Scripting</h2><scripting-part scripting_name="nodal_from_mesh" license="none" cat="scoping" plugin="core" cpp-name="GetNodeScopingFromMesh"></scripting-part><h2 class="op-des-h2">Changelog</h2><op-changelog content='{"0.0.0":"New"}'></op-changelog></div><div class="operator" id="merge any objects" scripting_name="merge_any"plugin="core"cat="utility"><h1 class="op-des-h1">utility: merge any objects</h1><figure class="figure-op-des"> <figcaption > Description </figcaption><div class = "figure-op-des-text"><p>Merges a list of objects having the same data types. Once the data type is found, the merge operation is forwarded to the correct merge Operator.</p>
1410614107
</div></figure><div class="op-version">Version 0.0.0</div><h2 class="op-des-h2">Inputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "true"></pin-number></td><td><pin-name name="any"></pin-name></td><td><req-type typeName="(any)"></req-type></td><td><div class = "pin-des-text"><p>Either a vector of objects (sharing the same data types) or objects from pin 0 to ... to merge. Supported types rely on existing type specific merge operators.</p>
1410714108
</div></td></tr></tbody></table></div><h2 class="op-des-h2">Outputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="any"></pin-name></td><td><req-type typeName="(any)"></req-type></td></tr></tbody></table></div><h2 class="op-des-h2">Configurations</h2><config-spec name="mutex" default="false" doc="If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads." types="bool" ></config-spec><config-spec name="read_inputs_in_parallel" default="false" doc="If this option is set to true, the operator's inputs will be evaluated in parallel." types="bool" ></config-spec><h2 class="op-des-h2">Scripting</h2><scripting-part scripting_name="merge_any" license="none" cat="utility" plugin="core" cpp-name="merge::any"></scripting-part><h2 class="op-des-h2">Changelog</h2><op-changelog content='{"0.0.0":"New"}'></op-changelog></div><div class="operator" id="merge time freq supports" scripting_name="merge_time_freq_supports"plugin="core"cat="utility"><h1 class="op-des-h1">utility: merge time freq supports</h1><figure class="figure-op-des"> <figcaption > Description </figcaption><div class = "figure-op-des-text"><p>Assembles a set of time/frequency supports into a unique one.</p>

src/ansys/dpf/core/operators/scoping/adapt_with_scopings_container.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class adapt_with_scopings_container(Operator):
2424
----------
2525
field_or_fields_container: FieldsContainer or Field
2626
scopings_container: ScopingsContainer
27+
keep_empty_fields: bool, optional
28+
Default false.
2729
2830
Returns
2931
-------
@@ -41,11 +43,14 @@ class adapt_with_scopings_container(Operator):
4143
>>> op.inputs.field_or_fields_container.connect(my_field_or_fields_container)
4244
>>> my_scopings_container = dpf.ScopingsContainer()
4345
>>> op.inputs.scopings_container.connect(my_scopings_container)
46+
>>> my_keep_empty_fields = bool()
47+
>>> op.inputs.keep_empty_fields.connect(my_keep_empty_fields)
4448
4549
>>> # Instantiate operator and connect inputs in one line
4650
>>> op = dpf.operators.scoping.adapt_with_scopings_container(
4751
... field_or_fields_container=my_field_or_fields_container,
4852
... scopings_container=my_scopings_container,
53+
... keep_empty_fields=my_keep_empty_fields,
4954
... )
5055
5156
>>> # Get output data
@@ -56,6 +61,7 @@ def __init__(
5661
self,
5762
field_or_fields_container=None,
5863
scopings_container=None,
64+
keep_empty_fields=None,
5965
config=None,
6066
server=None,
6167
):
@@ -66,6 +72,8 @@ def __init__(
6672
self.inputs.field_or_fields_container.connect(field_or_fields_container)
6773
if scopings_container is not None:
6874
self.inputs.scopings_container.connect(scopings_container)
75+
if keep_empty_fields is not None:
76+
self.inputs.keep_empty_fields.connect(keep_empty_fields)
6977

7078
@staticmethod
7179
def _spec() -> Specification:
@@ -87,6 +95,12 @@ def _spec() -> Specification:
8795
optional=False,
8896
document=r"""""",
8997
),
98+
2: PinSpecification(
99+
name="keep_empty_fields",
100+
type_names=["bool"],
101+
optional=True,
102+
document=r"""Default false.""",
103+
),
90104
},
91105
map_output_pin_spec={
92106
0: PinSpecification(
@@ -155,6 +169,8 @@ class InputsAdaptWithScopingsContainer(_Inputs):
155169
>>> op.inputs.field_or_fields_container.connect(my_field_or_fields_container)
156170
>>> my_scopings_container = dpf.ScopingsContainer()
157171
>>> op.inputs.scopings_container.connect(my_scopings_container)
172+
>>> my_keep_empty_fields = bool()
173+
>>> op.inputs.keep_empty_fields.connect(my_keep_empty_fields)
158174
"""
159175

160176
def __init__(self, op: Operator):
@@ -167,6 +183,10 @@ def __init__(self, op: Operator):
167183
adapt_with_scopings_container._spec().input_pin(1), 1, op, -1
168184
)
169185
self._inputs.append(self._scopings_container)
186+
self._keep_empty_fields = Input(
187+
adapt_with_scopings_container._spec().input_pin(2), 2, op, -1
188+
)
189+
self._inputs.append(self._keep_empty_fields)
170190

171191
@property
172192
def field_or_fields_container(self) -> Input:
@@ -206,6 +226,27 @@ def scopings_container(self) -> Input:
206226
"""
207227
return self._scopings_container
208228

229+
@property
230+
def keep_empty_fields(self) -> Input:
231+
r"""Allows to connect keep_empty_fields input to the operator.
232+
233+
Default false.
234+
235+
Returns
236+
-------
237+
input:
238+
An Input instance for this pin.
239+
240+
Examples
241+
--------
242+
>>> from ansys.dpf import core as dpf
243+
>>> op = dpf.operators.scoping.adapt_with_scopings_container()
244+
>>> op.inputs.keep_empty_fields.connect(my_keep_empty_fields)
245+
>>> # or
246+
>>> op.inputs.keep_empty_fields(my_keep_empty_fields)
247+
"""
248+
return self._keep_empty_fields
249+
209250

210251
class OutputsAdaptWithScopingsContainer(_Outputs):
211252
"""Intermediate class used to get outputs from
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)