xugrid.UgridDataArrayAccessor.label_partitions#

UgridDataArrayAccessor.label_partitions(n_part: int)[source]#

Generate partition labels for this grid topology using METIS: KarypisLab/METIS

This method utilizes the pymetis Python bindings: inducer/pymetis

The data of the UgridDataArray are treated as weights.

Parameters:

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

Returns:

partition_labels

Return type:

UgridDataArray of integers