xugrid.Ugrid2d.partition#

Ugrid2d.partition(n_part: int, weights: ndarray | None = None)#

Partition this grid topology using METIS: KarypisLab/METIS

This method utilizes the pymetis Python bindings: inducer/pymetis

Parameters:
  • n_part (integer) – The number of parts to partition the mesh.

  • weights (optional, np.ndarray of integers) – The weight associated with each elements.

Return type:

partitions