ansys.dpf.core.operators.utility.merge_any#

class ansys.dpf.core.operators.utility.merge_any(any1=None, any2=None, config=None, server=None)#

Bases: ansys.dpf.core.dpf_operator.Operator

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.

Parameters:
  • any1 (Any) – 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.

  • any2 (Any) – 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.

Returns:

any

Return type:

Any

Examples

>>> from ansys.dpf import core as dpf
>>> # Instantiate operator
>>> op = dpf.operators.utility.merge_any()
>>> # Make input connections
>>> my_any1 = dpf.Any()
>>> op.inputs.any1.connect(my_any1)
>>> my_any2 = dpf.Any()
>>> op.inputs.any2.connect(my_any2)
>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.utility.merge_any(
...     any1=my_any1,
...     any2=my_any2,
... )
>>> # Get output data
>>> result_any = op.outputs.any()
_inputs#
_outputs#
static _spec() ansys.dpf.core.operators.specification.Specification#
static default_config(server: ansys.dpf.core.server_types.AnyServerType = None) ansys.dpf.core.config.Config#

Returns the default config of the operator.

This config can then be changed to the user needs and be used to instantiate the operator. The Configuration allows to customize how the operation will be processed by the operator.

Parameters:

server – Server with channel connected to the remote or local instance. When None, attempts to use the global server.

Returns:

A new Config instance equivalent to the default config for this operator.

Return type:

config

property inputs: InputsMergeAny#

Enables to connect inputs to the operator

Returns:

An instance of InputsMergeAny.

Return type:

inputs

property outputs: OutputsMergeAny#

Enables to get outputs of the operator by evaluating it

Returns:

An instance of OutputsMergeAny.

Return type:

outputs