Skip to main content
`Ctrl`+`K`

# DMStagGetOwnershipRanges

get elements per rank in each direction

## Synopsis

    #include "petscdmstag.h"
    #include "petscdmproduct.h"
    PetscErrorCode DMStagGetOwnershipRanges(DM dm, const PetscInt *lx[], const PetscInt *ly[], const PetscInt *lz[])

Not Collective

## Input Parameter

- dm - the `DMSTAG` object

## Output Parameters

- lx - ownership along x direction (optional)

- ly - ownership along y direction (optional)

- lz - ownership along z direction (optional)

## Notes

These correspond to the optional final arguments passed to `DMStagCreate1d()`, `DMStagCreate2d()`, and `DMStagCreate3d()`.

Arguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.

In C you should not free these arrays, nor change the values in them. They will only have valid values while the `DMSTAG` they came from still exists (has not been destroyed).

## See Also

DMSTAG: Staggered, Structured Grid, `DMSTAG`, `DMStagSetGlobalSizes()`, `DMStagSetOwnershipRanges()`, `DMStagCreate1d()`, `DMStagCreate2d()`, `DMStagCreate3d()`, `DMDAGetOwnershipRanges()`

## Level

intermediate

## Location

src/dm/impls/stag/stagutils.c

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