Inputs#

class ansys.dpf.core.inputs.Input(spec, pin, operator, count_ellipsis=- 1)#

Intermediate class internally instantiated by the ansys.dpf.core.dpf_operator.Operator. Used to connect inputs to the Operator.

Examples

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> data_src = dpf.DataSources(examples.msup_transient)
>>> disp_op = dpf.operators.result.displacement()
>>> isinstance(disp_op.inputs.data_sources, dpf.inputs.Input)
True
>>> disp_op.inputs.data_sources(data_src)
>>> disp_op.inputs.time_scoping([2])
connect(inpt)#

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

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

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.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])
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.

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

  • 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.