Skip to content

Update generated code for DPF 261_test_bugfix_131035_v2 on main #2531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/source/_static/dpf_operators.html
Original file line number Diff line number Diff line change
Expand Up @@ -14101,7 +14101,8 @@ <h2 class="h2-main">Configurating operators</h2>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class adapt_with_scopings_container(Operator):
----------
field_or_fields_container: FieldsContainer or Field
scopings_container: ScopingsContainer
keep_empty_fields: bool, optional
Default false.

Returns
-------
Expand All @@ -41,11 +43,14 @@ class adapt_with_scopings_container(Operator):
>>> op.inputs.field_or_fields_container.connect(my_field_or_fields_container)
>>> my_scopings_container = dpf.ScopingsContainer()
>>> op.inputs.scopings_container.connect(my_scopings_container)
>>> my_keep_empty_fields = bool()
>>> op.inputs.keep_empty_fields.connect(my_keep_empty_fields)

>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.scoping.adapt_with_scopings_container(
... field_or_fields_container=my_field_or_fields_container,
... scopings_container=my_scopings_container,
... keep_empty_fields=my_keep_empty_fields,
... )

>>> # Get output data
Expand All @@ -56,6 +61,7 @@ def __init__(
self,
field_or_fields_container=None,
scopings_container=None,
keep_empty_fields=None,
config=None,
server=None,
):
Expand All @@ -66,6 +72,8 @@ def __init__(
self.inputs.field_or_fields_container.connect(field_or_fields_container)
if scopings_container is not None:
self.inputs.scopings_container.connect(scopings_container)
if keep_empty_fields is not None:
self.inputs.keep_empty_fields.connect(keep_empty_fields)

@staticmethod
def _spec() -> Specification:
Expand All @@ -87,6 +95,12 @@ def _spec() -> Specification:
optional=False,
document=r"""""",
),
2: PinSpecification(
name="keep_empty_fields",
type_names=["bool"],
optional=True,
document=r"""Default false.""",
),
},
map_output_pin_spec={
0: PinSpecification(
Expand Down Expand Up @@ -155,6 +169,8 @@ class InputsAdaptWithScopingsContainer(_Inputs):
>>> op.inputs.field_or_fields_container.connect(my_field_or_fields_container)
>>> my_scopings_container = dpf.ScopingsContainer()
>>> op.inputs.scopings_container.connect(my_scopings_container)
>>> my_keep_empty_fields = bool()
>>> op.inputs.keep_empty_fields.connect(my_keep_empty_fields)
"""

def __init__(self, op: Operator):
Expand All @@ -167,6 +183,10 @@ def __init__(self, op: Operator):
adapt_with_scopings_container._spec().input_pin(1), 1, op, -1
)
self._inputs.append(self._scopings_container)
self._keep_empty_fields = Input(
adapt_with_scopings_container._spec().input_pin(2), 2, op, -1
)
self._inputs.append(self._keep_empty_fields)

@property
def field_or_fields_container(self) -> Input:
Expand Down Expand Up @@ -206,6 +226,27 @@ def scopings_container(self) -> Input:
"""
return self._scopings_container

@property
def keep_empty_fields(self) -> Input:
r"""Allows to connect keep_empty_fields input to the operator.

Default false.

Returns
-------
input:
An Input instance for this pin.

Examples
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.scoping.adapt_with_scopings_container()
>>> op.inputs.keep_empty_fields.connect(my_keep_empty_fields)
>>> # or
>>> op.inputs.keep_empty_fields(my_keep_empty_fields)
"""
return self._keep_empty_fields


class OutputsAdaptWithScopingsContainer(_Outputs):
"""Intermediate class used to get outputs from
Expand Down
Binary file modified src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll
Binary file not shown.
Binary file modified src/ansys/dpf/gatebin/DPFClientAPI.dll
Binary file not shown.
Binary file modified src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so
Binary file not shown.
Loading