DMPlexMigrateGlobalToNaturalSF — PETSc 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# DMPlexMigrateGlobalToNaturalSF

Migrates the input `sfNatural` based on sfMigration

## Synopsis

    #include "petscdmplex.h"
    PetscErrorCode DMPlexMigrateGlobalToNaturalSF(DM dmOld, DM dmNew, PetscSF sfNaturalOld, PetscSF sfMigration, PetscSF *sfNaturalNew)

## Input Parameters

- dmOld - The original `DM`

- dmNew - The `DM` to be migrated to

- sfNaturalOld - The sfNatural for the `dmOld`

- sfMigration - The `PetscSF` used to distribute the mesh, or `NULL` if it cannot be computed

## Output Parameter

- sfNaturalNew - `PetscSF` for mapping the `Vec` in PETSc ordering to the canonical ordering

## Notes

`sfNaturalOld` maps from the old Global section (roots) to the natural Vec layout (leaves, may or may not be described by a PetscSection). `DMPlexMigrateGlobalToNaturalSF` creates an SF to map from the old global section to the new global section (generated from `sfMigration`). That SF is then composed with the `sfNaturalOld` to generate `sfNaturalNew`. This also distributes and sets the local section for `dmNew`.

This is not typically called by the user.

## See Also

DMPlex: Unstructured Grids, `DM`, `DMPLEX`, `PetscSF`, `PetscSection`, `DMPlexDistribute()`, `DMPlexDistributeField()`

## Level

intermediate

## Location

src/dm/impls/plex/plexnatural.c

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