mesh.Mesh.grow_selection#

Mesh.grow_selection(sel, mode='node', nsteps=1)#

Grow a selection of a Mesh by frontal steps.

Parameters#

sel: int or list of ints

Initial element number(s) in the selection.

mode: str

Specifies how a single frontal step is done:

  • ‘node’ : add all elements that have a node in common,

  • ‘edge’ : add all elements that have an edge in common.

nsteps: int

Number of frontal steps to undertake.

Returns#

int array

The list of element numbers obtained by growing the front nsteps times.

Examples#

>>> M = Mesh(eltype='quad4').subdivide(4)
>>> print(M.grow_selection(0, nsteps=2))
[ 0  1  2  4  5  6  8  9 10]