mymesh.utils.identify_elem#

mymesh.utils.identify_elem(NodeCoords, NodeConn, Type=None)[source]#

Identify the types of elements present in the mesh. This provides this only identifies the unique types present, not the type of each individual element.

Parameters:
  • NodeCoords (array_like) – Node coordinates.

  • NodeConn (array_like) – Node connectivity.

  • Type (str, NoneType, optional) – Type of mesh (‘line’, ‘surf’, ‘vol’), if known. For some meshes this won’t be needed, if it is but isn’t provided, it will be identified using identify_type(). By default None.

Returns:

elems – List of strings identifying the element types present in the mesh

Return type:

list

Examples

>>> S = primitives.Sphere([0,0,0], 1, Type='surf')
>>> utils.identify_elem(S.NodeCoords, S.NodeConn)
['tri', 'quad']
>>> S = primitives.Sphere([0,0,0], 1, Type='surf', ElemType='tri')
>>> utils.identify_elem(S.NodeCoords, S.NodeConn)
['tri']