openmdao/core/group.py
def compute_sys_graph(self, comps_only=False):
        """
        Compute a dependency graph for subsystems in this group.

        Variable connection information is stored in each edge of
        the system graph.

        Parameters
        ----------
        comps_only : bool (False)
            If True, return a graph of all components within this group
            or any of its descendants. No sub-groups will be included. Otherwise,
            a graph containing only direct children (both Components and Groups)
            of this group will be returned.

        Returns
        -------
        DiGraph
            A directed graph containing names of subsystems and their connections.
        """
        input_srcs = self._conn_global_abs_in2out
        glen = len(self.pathname.split('.')) if self.pathname else 0
        graph = nx.DiGraph()

        # add all systems as nodes in the graph so they'll be there even if
        # unconnected.
        if comps_only:
            graph.add_nodes_from(s.pathname for s in
                                 self.system_iter(recurse=True, typ=Component))
        else:
            graph.add_nodes_from(s.pathname for s in self._subsystems_allprocs)

        edge_data = defaultdict(lambda: defaultdict(list))

        for in_abs, src_abs in iteritems(input_srcs):
            if src_abs is not None:
                if comps_only:
                    src = src_abs.rsplit('.', 1)[0]
                    tgt = in_abs.rsplit('.', 1)[0]
                else:
                    src = src_abs.split('.')[glen]
                    tgt = in_abs.split('.')[glen]

                # store var connection data in each system to system edge for later
                # use in relevance calculation.
                edge_data[(src, tgt)][src_abs].append(in_abs)

        for key in edge_data:
            src_sys, tgt_sys = key
            graph.add_edge(src_sys, tgt_sys, conns=edge_data[key])

        return graph

        Compute a dependency graph for subsystems in this group.

        Variable connection information is stored in each edge of
        the system graph.

        Parameters
        ----------
        comps_only : bool (False)
            If True, return a graph of all components within this group
            or any of its descendants. No sub-groups will be included. Otherwise,
            a graph containing only direct children (both Components and Groups)
            of this group will be returned.

        Returns
        -------
        DiGraph
            A directed graph containing names of subsystems and their connections.
        
Compute a dependency graph for subsystems in this group.
Variable connection information is stored in each edge of
the system graph.

Parameters

comps_only : bool (False)
If True, return a graph of all components within this group
or any of its descendants. No sub-groups will be included. Otherwise,
a graph containing only direct children (both Components and Groups)
of this group will be returned.

Returns

DiGraph
A directed graph containing names of subsystems and their connections.
Compute a dependency graph for subsystems in this group . Variable connection information is stored in each edge of the system graph . Parameters comps_only : bool ( False ) If True return a graph of all components within this group or any of its descendants . No sub - groups will be included . Otherwise a graph containing only direct children ( both Components and Groups ) of this group will be returned . Returns DiGraph A directed graph containing names of subsystems and their connections .
def compute_sys_graph(self, comps_only=False):
        input_srcs = self._conn_global_abs_in2out
        glen = len(self.pathname.split('.')) if self.pathname else 0
        graph = nx.DiGraph()
        if comps_only:
            graph.add_nodes_from(s.pathname for s in
                                 self.system_iter(recurse=True, typ=Component))
        else:
            graph.add_nodes_from(s.pathname for s in self._subsystems_allprocs)
        edge_data = defaultdict(lambda: defaultdict(list))
        for in_abs, src_abs in iteritems(input_srcs):
            if src_abs is not None:
                if comps_only:
                    src = src_abs.rsplit('.', 1)[0]
                    tgt = in_abs.rsplit('.', 1)[0]
                else:
                    src = src_abs.split('.')[glen]
                    tgt = in_abs.split('.')[glen]
                edge_data[(src, tgt)][src_abs].append(in_abs)
        for key in edge_data:
            src_sys, tgt_sys = key
            graph.add_edge(src_sys, tgt_sys, conns=edge_data[key])
        return graph
def compute_sys_graph ( self , comps_only = False ) : input_srcs = self . _conn_global_abs_in2out glen = len ( self . pathname . split ( '.' ) ) if self . pathname else 0 graph = nx . DiGraph ( ) if comps_only : graph . add_nodes_from ( s . pathname for s in self . system_iter ( recurse = True , typ = Component ) ) else : graph . add_nodes_from ( s . pathname for s in self . _subsystems_allprocs ) edge_data = defaultdict ( lambda : defaultdict ( list ) ) for in_abs , src_abs in iteritems ( input_srcs ) : if src_abs is not None : if comps_only : src = src_abs . rsplit ( '.' , 1 ) [ 0 ] tgt = in_abs . rsplit ( '.' , 1 ) [ 0 ] else : src = src_abs . split ( '.' ) [ glen ] tgt = in_abs . split ( '.' ) [ glen ] edge_data [ ( src , tgt ) ] [ src_abs ] . append ( in_abs ) for key in edge_data : src_sys , tgt_sys = key graph . add_edge ( src_sys , tgt_sys , conns = edge_data [ key ] ) return graph
Compute a dependency graph for subsystems in this group.
Compute a dependency graph for subsystems in this group .
"""
        Compute a dependency graph for subsystems in this group.

        Variable connection information is stored in each edge of
        the system graph.

        Parameters
        ----------
        comps_only : bool (False)
            If True, return a graph of all components within this group
            or any of its descendants. No sub-groups will be included. Otherwise,
            a graph containing only direct children (both Components and Groups)
            of this group will be returned.

        Returns
        -------
        DiGraph
            A directed graph containing names of subsystems and their connections.
        """ # add all systems as nodes in the graph so they'll be there even if # unconnected. # store var connection data in each system to system edge for later # use in relevance calculation.
self
comps_only