graph_utils.py#
Various graph related utilities.
- openmdao.utils.graph_utils.get_cycle_tree(group)[source]
Compute the tree of cycles for the given group.
- Parameters:
- group<Group>
The specified Group.
- Returns:
- networkx.DiGraph
The component graph for the given Group.
- dict
A mapping of group path name to a tuple of the form (children, recursive_scc, unique_scc, scc_index, path, parent path or None).
- 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.
- openmdao.utils.graph_utils.print_cycle_tree(group)[source]
Print the tree of cycles for the given group.
- Parameters:
- group<Group>
The specified Group.