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
compactmethod, such asmesh.Meshand 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#
remove_selected(): Return all but the selected elements.clip(): Like select, but with compact=True as default.