flow.region_mask
flow.region_mask(selection, centers)
Boolean mask over cell centres for a node selection, volumetrically.
Parameters
| selection |
Any |
A :class:~cadjoint.studies.selection.NodeSelection, or None for “every cell”. |
required |
| centers |
np.ndarray |
(..., 3) cell-centre world coordinates, as :meth:~cadjoint.flow.FlowGrid.centers returns. |
required |
Returns
|
np.ndarray |
A boolean array shaped like centers without its last axis. |
Raises
|
ValueError |
If the selection uses a kind a lattice cannot resolve (Nodes.side, Nodes.predicate). |