Inputs#

class ansys.dpf.core.inputs.Inputs(dict_inputs, operator)#

Bases: _Inputs

Intermediate class internally instantiated by the ansys.dpf.core.dpf_operator.Operator.

Used to connect inputs to the Operator by automatically checking types to connect correct inputs.

Examples

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> data_src = dpf.DataSources(examples.find_msup_transient())
>>> disp_op = dpf.operators.result.displacement()
>>> isinstance(disp_op.inputs, dpf.inputs._Inputs)
True
>>> disp_op.inputs.connect(data_src)
>>> disp_op.inputs.connect([2])

Overview#

connect

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

Import detail#

from ansys.dpf.core.inputs import Inputs

Method detail#

Inputs.__str__()#
Inputs.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.

Parameters:
  • inpt (str, int, double, bool, list[int], list[float], Field, FieldsContainer, Scoping, Enum,)

  • ScopingsContainer (E501) – Input of the operator.

  • MeshedRegion (E501) – Input of the operator.

  • MeshesContainer (E501) – Input of the operator.

  • DataSources (E501) – Input of the operator.

  • CyclicSupport (E501) – Input of the operator.

  • Outputs (E501) – Input of the operator.

  • noqa (os.PathLike #) – Input of the operator.

Inputs.__call__(inpt)#
Inputs.__getitem__(item) Input#