mymesh.utils.getConnectedElements#
- mymesh.utils.getConnectedElements(NodeCoords, NodeConn, ElemNeighbors=None, mode='edge', BarrierElems={})[source]#
Identifies groups of connected nodes. For a fully connected mesh, a single region will be identified
- Parameters:
NodeCoords (list of lists) – List of nodal coordinates.
NodeConn (list of lists) – Nodal connectivity list.
ElemNeighbors (list, optional) – List of neighboring elements for each element in NodeConn. The default is None. If no value is provided, it will be computed with getNodeNeighbors
mode (str, optional) – Connectivity method to be used for getElemNeighbors. The default is ‘edge’.
BarrierElems (set, optional) – Set of barrier elements that the connected region cannot move past. They can be included in a region, but will not connect to their neighbors
- Returns:
ElemRegions – Each set in the list contains a region of connected nodes. Sorted by size of region such that the region with the most nodes is first in the list.
- Return type:
list of sets