mymesh.utils.getElemNeighbors#

mymesh.utils.getElemNeighbors(NodeCoords, NodeConn, mode='face', ElemConn=None)[source]#

Get list of neighboring elements for each element in the mesh.

Parameters:
  • NodeCoords (list) – List of nodal coordinates.

  • NodeConn (list) – List of nodal connectivities.

  • mode (str, optional) – Neighbor mode, will determine what type of connectivity constitutes an element neighbor, by default ‘face’. ‘node’ : Any elements that share at least one node are considered neighbors. TODO: Not currently implemented. ‘edge’ : Any elements that share an edge are considered neighbors. ‘face’ : Any elements that share a face are considered neighbors. NOTE that in surface meshes, no elements share faces.

  • ElemConn (list, optional) – Node-Element connectivity of the mesh as obtained by getNodeNeighbors. If supplied, won’t require an additional call to getNodeNeighbors. Only relevant if mode == ‘node’, by default None.

Returns:

ElemNeighbors – List of element neighbors. For each element, there is a list of the indices of the neighboring elements.

Return type:

list