mymesh.converter.solid2tets#
- mymesh.converter.solid2tets(NodeCoords, NodeConn, return_ids=False, return_inv=False)[source]#
Decompose all elements of a 3D volume mesh to tetrahedra. NOTE the generated tetrahedra will not necessarily be continuously oriented, i.e. edges of child tetrahedra may not be aligned between one parent element and its neighbor, and thus the resulting mesh will typically be invalid. The primary use-case for this method is for methods like quality.Volume which utilize the geometric properties of tetrahedra to determine properties of the parent elements.
- Parameters:
NodeCoords (list) – List of nodal coordinates.
NodeConn (list) – Nodal connectivity list.
return_ids (bool, optional) – Element IDs of the tets connected to the original elements, by default False
return_inv (bool, optional) – If True, return element IDs of the original elements that correspond to the tetrahedral elements, by default False
- Returns:
TetCoords (list) – Nodal coordinates of the generated tetrahedra. Depending on what elements are in the original mesh, new nodes may have been added.
TetConn (list) – Nodal connectivity list of generated tetrahedra
ElemIds (list, optional) – If return_ids = True, a list of the element ids of the new tetrahedra for each of the original elements.
inv (np.ndarray, optional) – Array of indices that point from the tetrahedral mesh back to the original mesh