mymesh.octree.Octree2Dual#
- mymesh.octree.Octree2Dual(root, method='centroid')[source]#
Converts an octree to a mesh that is dual to the octree structure. This mesh contains hexahedral elements with nodes contained inside octree nodes, rather than at the octree vertices. At transitions between octree node levels, some hexahedra may be partially degenerate (i.e. form pyramids rather than hexahedra). Based on the algorithm proposed by [SW05] and explained by [Hol10]. This website is another useful reference.
- Parameters:
root (octree.OctreeNode) – Root node of the octree
method (str, optional) –
Method used for placing the dual vertices within the octree nodes, by default ‘centroid’.
Currently the only implemented option is to place the vertices at the centroids of the octree nodes.
- Returns:
DualCoords (np.ndarray) – Array of nodal coordinates.
DualConn (np.ndarray) – List of node connectivities for the hexahedral mesh.