Skip to main content
`Ctrl`+`K`

# DMPlexRebalanceSharedPoints

Redistribute points in the plex that are shared in order to achieve better balancing. This routine updates the `PointSF` of the `DM` inplace.

## Synopsis

    #include "petscdmplex.h"
    PetscErrorCode DMPlexRebalanceSharedPoints(DM dm, PetscInt entityDepth, PetscBool useInitialGuess, PetscBool parallel, PetscBool *success)

## Input Parameters

- dm - The `DMPLEX` object.

- entityDepth - depth of the entity to balance (0 -> balance vertices).

- useInitialGuess - whether to use the current distribution as initial guess (only used by ParMETIS).

- parallel - whether to use ParMETIS and do the partition in parallel or whether to gather the graph onto a single process and use METIS.

## Output Parameter

- success - whether the graph partitioning was successful or not, optional. Unsuccessful simply means no change to the partitioning

## Options Database Keys

- -dm_plex_rebalance_shared_points_parmetis - Use ParMetis instead of Metis for the partitioner

- -dm_plex_rebalance_shared_points_use_initial_guess - Use current partition to bootstrap ParMetis partition

- -dm_plex_rebalance_shared_points_use_mat_partitioning - Use the MatPartitioning object to perform the partition, the prefix for those operations is -dm_plex_rebalance_shared_points_

- -dm_plex_rebalance_shared_points_monitor - Monitor the shared points rebalance process

## See Also

DMPlex: Unstructured Grids, `DM`, `DMPLEX`, `DMPlexDistribute()`

## Level

intermediate

## Location

src/dm/impls/plex/plexpartition.c

Index of all DMPlex routines
Table of Contents for all manual pages
Index of all manual pages