geometry.Geometry.select#

Geometry.select(sel, compact=False)#

Select some element(s) from a Geometry.

Parameters#

sel: index-like

The index of element(s) to be selected. This can be anything that can be used as an index in an array:

  • a single element number

  • a list, or array, of element numbers

  • a bool list, or array, of length self.n_elems(), where True values flag the elements to be selected

compact: bool, optional

This option is only useful for subclasses that have a compact method, such as mesh.Mesh and its subclasses. If True, the returned object will be compacted, i.e. unused nodes are removed and the nodes are renumbered from zero. If False (default), the node set and numbers are returned unchanged.

Returns#

Geometry (or subclass) object

An object of the same class as the caller, but only containing the selected elements.

See Also#