InputsForEach#

class ansys.dpf.core.operators.utility.for_each.InputsForEach(op: ansys.dpf.core.dpf_operator.Operator)#

Bases: ansys.dpf.core.inputs._Inputs

Intermediate class used to connect user inputs to for_each operator.

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.utility.for_each()
>>> my_iterable = dpf.()
>>> op.inputs.iterable.connect(my_iterable)
>>> my_iterable_values = dpf.()
>>> op.inputs.iterable_values.connect(my_iterable_values)
>>> my_pin_index = int()
>>> op.inputs.pin_index.connect(my_pin_index)
>>> my_forward1 = dpf.()
>>> op.inputs.forward1.connect(my_forward1)
>>> my_forward2 = dpf.()
>>> op.inputs.forward2.connect(my_forward2)

Overview#

connect

Connect any input (an entity or an operator output) to any input pin of this operator.

iterable

Allows to connect iterable input to the operator.

iterable_values

Allows to connect iterable_values input to the operator.

pin_index

Allows to connect pin_index input to the operator.

forward1

Allows to connect forward1 input to the operator.

forward2

Allows to connect forward2 input to the operator.

Import detail#

from ansys.dpf.core.operators.utility.for_each import InputsForEach

Property detail#

property InputsForEach.iterable: ansys.dpf.core.inputs.Input#

Allows to connect iterable input to the operator.

Either the result of the make_iterable_info operator, or the operator that must be incremented.

Returns:

An Input instance for this pin.

Return type:

input

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.utility.for_each()
>>> op.inputs.iterable.connect(my_iterable)
>>> # or
>>> op.inputs.iterable(my_iterable)
property InputsForEach.iterable_values: ansys.dpf.core.inputs.Input#

Allows to connect iterable_values input to the operator.

Returns:

An Input instance for this pin.

Return type:

input

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.utility.for_each()
>>> op.inputs.iterable_values.connect(my_iterable_values)
>>> # or
>>> op.inputs.iterable_values(my_iterable_values)
property InputsForEach.pin_index: ansys.dpf.core.inputs.Input[int]#

Allows to connect pin_index input to the operator.

Returns:

An Input instance for this pin.

Return type:

input

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.utility.for_each()
>>> op.inputs.pin_index.connect(my_pin_index)
>>> # or
>>> op.inputs.pin_index(my_pin_index)
property InputsForEach.forward1: ansys.dpf.core.inputs.Input#

Allows to connect forward1 input to the operator.

Returns:

An Input instance for this pin.

Return type:

input

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.utility.for_each()
>>> op.inputs.forward1.connect(my_forward1)
>>> # or
>>> op.inputs.forward1(my_forward1)
property InputsForEach.forward2: ansys.dpf.core.inputs.Input#

Allows to connect forward2 input to the operator.

Returns:

An Input instance for this pin.

Return type:

input

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.utility.for_each()
>>> op.inputs.forward2.connect(my_forward2)
>>> # or
>>> op.inputs.forward2(my_forward2)

Method detail#

InputsForEach.__str__()#
InputsForEach.connect(inpt)#

Connect any input (an entity or an operator output) to any input pin of this operator.

Searches for the input type corresponding to the output.

Deprecated since version Deprecated: in favor of explicit output-to-input connections.

InputsForEach.__call__(inpt)#
InputsForEach.__getitem__(item) → Input#