modeci_mdf.mdf.Node
- class modeci_mdf.mdf.Node(id: str, input_ports: List[InputPort] = _Nothing.NOTHING, functions: List[Function] = _Nothing.NOTHING, parameters: List[Parameter] = _Nothing.NOTHING, output_ports: List[OutputPort] = _Nothing.NOTHING, *, metadata: Optional[Dict[str, Any]] = None)[source]
Bases:
MdfBase
A self contained unit of evaluation receiving input from other nodes on :class:`InputPort`(s). The values from these are processed via a number of :class:`Function`(s) and one or more final values are calculated on the :class:`OutputPort`(s)
- Variables:
id (str) – A unique identifier for the node.
input_ports (List[modeci_mdf.mdf.InputPort]) – Dictionary of the
InputPort
objects in the Nodeparameters (List[modeci_mdf.mdf.Parameter]) – Dictionary of :class:`Parameter`(s) for the node
functions (List[modeci_mdf.mdf.Function]) – The :class:`Function`(s) for computation the node
output_ports (List[modeci_mdf.mdf.OutputPort]) – The :class:`OutputPort`(s) containing evaluated quantities from the node
Method generated by attrs for class Node.
Methods
get_input_port
(id)Retrieve
InputPort
object corresponding to the given id :param id: Unique identifier of class:InputPort objectget_output_port
(id)Retrieve
OutputPort
object corresponding to the given id :param id: Unique identifier of class:OutputPort objectget_parameter
(id)Get a parameter by its string
id
- get_input_port(id: str) InputPort [source]
Retrieve
InputPort
object corresponding to the given id :param id: Unique identifier of class:InputPort object- Returns:
InputPort object if the entered id matches with the id of class:InputPort present in the class:Node
- Return type:
class
- get_output_port(id: str) OutputPort [source]
Retrieve
OutputPort
object corresponding to the given id :param id: Unique identifier of class:OutputPort object- Returns:
OutputPort object if the entered id matches with the id of class:OutputPort present in the class:Node
- Return type:
class