mesh.Mesh.adjacent_to#
- Mesh.adjacent_to(elements, level=0)#
Find the elements adjacent to the specified elements.
Adjacent elements are elements that share some lower entity.
Parameters#
- elements: int or int array_like
Element numbers to find the adjacent elements for.
- level: int
The level of the entities used to define adjacency. If negative, it is a value relative to the level of the caller. If non-negative, it specifies the absolute level. Default is 0 (nodes).
Returns#
- int array
A list of the numbers of all the elements in the Mesh that are adjacent to any of the specified elements.
Examples#
>>> M = Mesh(eltype='quad4').subdivide(3,2) >>> print(M.adjacent_to(0)) [1 3 4] >>> print(M.adjacent_to(0, level=1)) [1 3] >>> print(M.adjacent_to([0, 1], level=1)) [0 1 2 3 4]