:orphan: # DMPlexGetLocalOffsets Allocate and populate array of local offsets for each cell closure. ## Synopsis ``` #include "petscdmplex.h" PetscErrorCode DMPlexGetLocalOffsets(DM dm, DMLabel domain_label, PetscInt label_value, PetscInt height, PetscInt dm_field, PetscInt *num_cells, PetscInt *cell_size, PetscInt *num_comp, PetscInt *l_size, PetscInt **offsets) ``` Not collective ## Input Parameters - ***dm -*** The `DMPLEX` object - ***domain_label -*** label for `DMPLEX` domain, or NULL for whole domain - ***label_value -*** Stratum value - ***height -*** Height of target cells in `DMPLEX` topology - ***dm_field -*** Index of `DMPLEX` field ## Output Parameters - ***num_cells -*** Number of local cells - ***cell_size -*** Size of each cell, given by cell_size * num_comp = num_dof - ***num_comp -*** Number of components per dof - ***l_size -*** Size of local vector - ***offsets -*** Allocated offsets array for cells ## Notes Allocate and populate array of shape [num_cells, cell_size] defining offsets for each value (cell, node) for local vector of the `DMPLEX` field. All offsets are in the range [0, l_size - 1]. Caller is responsible for freeing the offsets array using `PetscFree()`. ## See Also [](ch_unstructured), `DMPlexGetLocalOffsetsSupport()`, `DM`, `DMPLEX`, `DMLabel`, `DMPlexGetClosureIndices()`, `DMPlexSetClosurePermutationTensor()`, `DMPlexGetCeedRestriction()` ## Level developer ## Location src/dm/impls/plex/plexceed.c ## Examples src/dm/impls/plex/tutorials/ex8.c
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/plex/plexceed.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)