diff --git a/doc/source/_static/dpf_operators.html b/doc/source/_static/dpf_operators.html index 9a9ef465ec..2374f12b2c 100644 --- a/doc/source/_static/dpf_operators.html +++ b/doc/source/_static/dpf_operators.html @@ -14101,7 +14101,8 @@

Configurating operators

Outputs

Configurations

Scripting

Changelog

averaging: elemental nodal to nodal elemental (field)

Description

Transforms an Elemental Nodal field to Nodal Elemental. The result is computed on a given node's scoping.

Version 0.0.0

Inputs

field or fields container with only one field is expected

Outputs

Configurations

Scripting

Changelog

scoping: adapt with scopings container

Description

Rescopes/splits a fields container to correspond to a scopings container.

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

scoping: nodes in mesh

Description

Retrieves the nodal scoping of a given input mesh, which contains the node IDs.

+
Version 0.0.0

Inputs

Default false.

+

Outputs

Configurations

Scripting

Changelog

scoping: nodes in mesh

Description

Retrieves the nodal scoping of a given input mesh, which contains the node IDs.

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

utility: merge any objects

Description

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.

Version 0.0.0

Inputs

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.

Outputs

Configurations

Scripting

Changelog

utility: merge time freq supports

Description

Assembles a set of time/frequency supports into a unique one.

diff --git a/src/ansys/dpf/core/operators/scoping/adapt_with_scopings_container.py b/src/ansys/dpf/core/operators/scoping/adapt_with_scopings_container.py index fd82c035d5..9249413b18 100644 --- a/src/ansys/dpf/core/operators/scoping/adapt_with_scopings_container.py +++ b/src/ansys/dpf/core/operators/scoping/adapt_with_scopings_container.py @@ -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 ------- @@ -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 @@ -56,6 +61,7 @@ def __init__( self, field_or_fields_container=None, scopings_container=None, + keep_empty_fields=None, config=None, server=None, ): @@ -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: @@ -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( @@ -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): @@ -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: @@ -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 diff --git a/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll b/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll index d2dbc9290f..cf536ea42f 100644 Binary files a/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll and b/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll differ diff --git a/src/ansys/dpf/gatebin/DPFClientAPI.dll b/src/ansys/dpf/gatebin/DPFClientAPI.dll index 124b6035ab..f0ed7b992e 100644 Binary files a/src/ansys/dpf/gatebin/DPFClientAPI.dll and b/src/ansys/dpf/gatebin/DPFClientAPI.dll differ diff --git a/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so b/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so index 8deba4a218..42e6785f69 100644 Binary files a/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so and b/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so differ