grids.mixins.core.GridUtilsMixin.compute_mesh_from_slices#
- GridUtilsMixin.compute_mesh_from_slices(slices: slice | Sequence[slice], /, axes: AxesInput | None = None, origin: Literal['active', 'global'] = 'active', __validate__: bool = True, **kwargs)[source]#
Compute coordinate arrays over a region of the grid specified by slice objects.
- Parameters:
slices (
slice
orlist
ofslice
) – Slice(s) specifying the region to extract along the selected axes.axes (
str
orlist
ofstr
, optional) – Axes to apply the slices to. If None, all axes are used.origin (
{"active", "global"}
, default"active"
) – Whether the slices are relative to the active domain (excluding ghost zones) or the full ghost-augmented domain.__validate__ (
bool
, defaultTrue
) – Enable or disable all validation procedures. This should only be done in tight loop scenarios where performance is critical and typing is well controlled.kwargs – Additional keyword arguments to pass to
numpy.meshgrid()
.
- Returns:
Physical coordinate arrays corresponding to the sliced region, one per axis.
- Return type:
tuple
ofnp.ndarray