mymesh.converter.wedge2tet#
- mymesh.converter.wedge2tet(NodeCoords, NodeConn, method='1to3c')[source]#
Decompose all elements of a 3D wedge-element mesh to tetrahedra. Generally solid2tets should be used rather than wedge2tet directly NOTE the generated tetrahedra of the ‘1to3’ method will not 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. ‘1to3c’, ‘1to14’ or ‘1to36’ will generate continuously oriented tetrahedra.
- Parameters:
NodeCoords (array_like) – List of nodal coordinates.
NodeConn (list) – Nodal connectivity list. All elements should be 6-Node wedge elements.
method (str, optional) – Method of decomposition to use for tetrahedralization. ‘1to3’ - Not continuously oriented, no nodes added, all elements decomposed the same way ‘1to3c’ - Continuously oriented, no nodes added (default) ‘1to14’ - Continuously oriented, nodes added at center of element and element faces ‘1to36’ - Continuously oriented, nodes added at center of element, element faces, and element edges
- Returns:
NewCoords (array_like) – New list of nodal coordinates. For ‘1to3’ this will be unchanged from the input.
TetConn, np.ndarray – Nodal connectivity list of generated tetrahedra
Examples
>>> # A single wedge element >>> WedgeCoords = np.array([[0., 0., 0.], [1., 0., 0.], [0.5, 1., 0.], [0., 0., 1.], [1., 0., 1.], [0.5, 1., 1.]]) >>> WedgeConn = [[0,1,2,3,4,5]] >>> TetCoords1to3, TetConn1to3 = converter.wedge2tet(WedgeCoords, WedgeConn, method='1to3') >>> TetCoords1to14, TetConn1to14 = converter.wedge2tet(WedgeCoords, WedgeConn, method='1to14') >>> TetCoords1to36, TetConn1to36 = converter.wedge2tet(WedgeCoords, WedgeConn, method='1to36')