grids.mixins.core.GridUtilsMixin.compute_domain_mesh#

GridUtilsMixin.compute_domain_mesh(axes: AxesInput | None = None, origin: Literal['active', 'global'] = 'active', __validate__: bool = True, **kwargs)[source]#

Compute a meshgrid of coordinate arrays spanning the full domain of the grid.

This constructs a broadcasted meshgrid over the selected axes, using either the active domain or the full ghost-augmented domain, as controlled by origin.

Parameters:
  • axes (str or list of str, optional) – The axes to include in the meshgrid. If None, all axes are used.

  • origin ({"active", "global"}, default "active") – Whether to base the meshgrid on the active domain or full global domain.

  • __validate__ (bool, default True) – Whether to validate inputs. Can be disabled for performance.

  • **kwargs – Additional keyword arguments passed to np.meshgrid, such as indexing.

Returns:

A tuple of N coordinate arrays, each of shape matching the domain, suitable for use in vectorized field evaluation.

Return type:

tuple of np.ndarray