InputsSerializer#

class ansys.dpf.core.operators.serialization.serializer.InputsSerializer(op: ansys.dpf.core.dpf_operator.Operator)#

Bases: ansys.dpf.core.inputs._Inputs

Intermediate class used to connect user inputs to serializer operator.

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.serialization.serializer()
>>> my_stream_type = int()
>>> op.inputs.stream_type.connect(my_stream_type)
>>> my_file_path = str()
>>> op.inputs.file_path.connect(my_file_path)
>>> my_any_input1 = dpf.Any()
>>> op.inputs.any_input1.connect(my_any_input1)
>>> my_any_input2 = dpf.Any()
>>> op.inputs.any_input2.connect(my_any_input2)

Overview#

connect

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

stream_type

Allows to connect stream_type input to the operator.

file_path

Allows to connect file_path input to the operator.

any_input1

Allows to connect any_input1 input to the operator.

any_input2

Allows to connect any_input2 input to the operator.

Import detail#

from ansys.dpf.core.operators.serialization.serializer import InputsSerializer

Property detail#

property InputsSerializer.stream_type: ansys.dpf.core.inputs.Input#

Allows to connect stream_type input to the operator.

0 for ASCII (default), and 1 for binary

Returns:

An Input instance for this pin.

Return type:

input

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.serialization.serializer()
>>> op.inputs.stream_type.connect(my_stream_type)
>>> # or
>>> op.inputs.stream_type(my_stream_type)
property InputsSerializer.file_path: ansys.dpf.core.inputs.Input#

Allows to connect file_path 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.serialization.serializer()
>>> op.inputs.file_path.connect(my_file_path)
>>> # or
>>> op.inputs.file_path(my_file_path)
property InputsSerializer.any_input1: ansys.dpf.core.inputs.Input#

Allows to connect any_input1 input to the operator.

any input

Returns:

An Input instance for this pin.

Return type:

input

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.serialization.serializer()
>>> op.inputs.any_input1.connect(my_any_input1)
>>> # or
>>> op.inputs.any_input1(my_any_input1)
property InputsSerializer.any_input2: ansys.dpf.core.inputs.Input#

Allows to connect any_input2 input to the operator.

any input

Returns:

An Input instance for this pin.

Return type:

input

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.serialization.serializer()
>>> op.inputs.any_input2.connect(my_any_input2)
>>> # or
>>> op.inputs.any_input2(my_any_input2)

Method detail#

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

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