# DMSlicedSetGhosts
Sets the global indices of other processes elements that will be ghosts on this process 
## Synopsis
```
#include "petscdmsliced.h" 
PetscErrorCode DMSlicedSetGhosts(DM dm, PetscInt bs, PetscInt nlocal, PetscInt Nghosts, const PetscInt ghosts[])
```
Not Collective


## Input Parameters

- ***slice -*** the DM object
- ***bs -*** block size
- ***nlocal -*** number of local (owned, non-ghost) blocks
- ***Nghosts -*** number of ghost blocks on this process
- ***ghosts -*** global indices of each ghost block





## See Also
`DMDestroy()`, `DMCreateGlobalVector()`


## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/sliced/sliced.c.html#DMSlicedSetGhosts">src/dm/impls/sliced/sliced.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/sliced/sliced.c)


[Index of all DM routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
