xugrid.Ugrid2d.label_partitions#
- Ugrid2d.label_partitions(n_part: int, weights: ndarray | None = None)#
Generate partition labels for 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.
- Returns:
partition_labels
- Return type:
UgridDataArray of integers