Source: GitHub
Signature¶
def sdynpy.fem.sdynpy_visualization_reduction.derive_node_adjacency_from_elements(node_ids, elem_conn)Build a node adjacency graph from element connectivity.
Here, any two nodes appearing in the same element are marked adjacent. This is a coarse notion of adjacency, but it is easy to compute and works even for mixed element sizes.
Parameters¶
node_ids : (n,) array of node IDs
elem_conn : sequence length m Each entry is an iterable of node IDs for one element.
Returns¶
adjacency : list of sets, length n adjacency[i] contains node indices adjacent to node i.