MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / comm_graph_data

Function comm_graph_data

python/dolfinx/graph.py:185–200  ·  view source on GitHub ↗

Build communication graph data for use with `NetworkX `_. Args: graph: Communication graph to build data from. Normally created by :func:`comm_graph`. Returns: A tuple of two lists. The first list contains the edge data, where an e

(
    graph: AdjacencyList,
)

Source from the content-addressed store, hash-verified

183
184
185def comm_graph_data(
186 graph: AdjacencyList,
187) -> tuple[list[tuple[int, int, dict[str, int]]], list[tuple[int, dict[str, int]]]]:
188 """Build communication graph data for use with `NetworkX <https://networkx.org/>`_.
189
190 Args:
191 graph: Communication graph to build data from. Normally created
192 by :func:`comm_graph`.
193
194 Returns:
195 A tuple of two lists. The first list contains the edge data,
196 where an edge is a `(nodeID_0, nodeID_1, dict)` tuple, where
197 `dict` holds edge data. The second list hold node data, where a
198 node is a `(nodeID, dict)` tuple, where `dict` holds node data.
199 """
200 return _cpp.graph.comm_graph_data(graph._cpp_object)
201
202
203def comm_to_json(graph: AdjacencyList) -> str:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected