mymesh.quality.AspectRatio#

mymesh.quality.AspectRatio(NodeCoords, NodeConn, verbose=False)[source]#

Calculates element aspect ratios for each element in the mesh. For all element types, the aspect ratio is calculated as the length of the longest edge divided by the length of the shortest edge of an element.

Aspect ratio is >= 1, with 1 being the optimal element quality.

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

  • NodeConn (list) – List of nodal connectivities.

  • verbose (bool, optional) – If true, will print min, max, and mean element quality, by default False.

Returns:

aspect – Array of aspect ratios for each element.

Return type:

np.ndarray