graph_utils.py

graph_utils.py#

Various graph related utilities.

openmdao.utils.graph_utils.get_out_of_order_nodes(graph, orders)[source]

Return a list of nodes that are out of order.

Parameters:
graphnetworkx.DiGraph

Directed graph of Systems.

ordersdict

A dict of order values keyed by node name.

Returns:
list of sets of str

A list of strongly connected components in topological order.

list of str

A list of nodes that are out of order.

openmdao.utils.graph_utils.get_sccs_topo(graph)[source]

Return strongly connected subsystems of the given Group in topological order.

Parameters:
graphnetworkx.DiGraph

Directed graph of Systems.

Returns:
list of sets of str

A list of strongly connected components in topological order.