PinSpecification#

class ansys.dpf.core.operator_specification.PinSpecification(name: str, type_names: list, document='', optional=False, ellipsis=False, name_derived_class='')#

Documents an input or output pin of an Operator.

Parameters:
  • name (str) – Name of the Pin.

  • type_names (list[str], list[type], list[ansys.dpf.core.types], ansys.dpf.core.types, type, str) – List of accepted types.

  • document (str, optional) – Explains what the pin is used for and what should be connect to it.

  • optional (bool, optional) – Whether it is optional to connect to Pin or not. Default is False.

  • ellipsis (bool, optional) – Whether data respecting this PinSpecification can be connected from this pin number to infinity. Default is False.

Examples

>>> from ansys.dpf import core as dpf
>>> operator = dpf.operators.result.displacement()
>>> pin_spec = operator.specification.inputs[4]
>>> pin_spec.name
'data_sources'
>>> pin_spec.type_names
['data_sources']
>>> pin_spec.document
'result file path container, used if no streams are set'
>>> pin_spec.optional
False

Overview#

type_names

Return the list of accepted types.

__repr__

Provide more detail in the representation of the instance.

__eq__

One instance is equal to the other if their string representation is the same.

Import detail#

from ansys.dpf.core.operator_specification import PinSpecification

Property detail#

property PinSpecification.type_names: list[str]#

Return the list of accepted types.

Returns:

List of accepted types.

Return type:

list[str], list[type]

Attribute detail#

PinSpecification.name: str#
PinSpecification.document: str#
PinSpecification.optional: bool#
PinSpecification.ellipsis: bool#
PinSpecification.name_derived_class#

Method detail#

PinSpecification.__repr__()#

Provide more detail in the representation of the instance.

PinSpecification.__eq__(other)#

One instance is equal to the other if their string representation is the same.