:orphan: # DMPlexRewriteSF Rewrites the ownership of the `PetsSF` of a `DM` (in place). ## Synopsis ``` #include "petscdmplex.h" static PetscErrorCode DMPlexRewriteSF(DM dm, PetscInt n, PetscInt *pointsToRewrite, PetscInt *targetOwners, const PetscInt *degrees) ``` ## Input parameters - ***dm -*** The `DMPLEX` object. - ***n -*** The number of points. - ***pointsToRewrite -*** The points in the `PetscSF` whose ownership will change. - ***targetOwners -*** New owner for each element in pointsToRewrite. - ***degrees -*** Degrees of the points in the `PetscSF` as obtained by `PetscSFComputeDegreeBegin()`/`PetscSFComputeDegreeEnd()`. ## See Also [](ch_unstructured), `DM`, `DMPLEX`, `DMLabel`, `PetscSF`, `DMPlexDistribute()`, `DMPlexCreateOverlap()` ## Level developer ## Location src/dm/impls/plex/plexpartition.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/plex/plexpartition.c) [Index of all DMPlex routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)