# DMDAMapMatStencilToGlobal
Map a list of `MatStencil` on a grid to global indices. 
## Synopsis
```
#include "petscdmda.h"   
PetscErrorCode DMDAMapMatStencilToGlobal(DM da, PetscInt m, const MatStencil idxm[], PetscInt gidxm[])
```
Not Collective


## Input Parameters

- ***da -*** the `DMDA` object
- ***m -*** number of MatStencils
- ***idxm -*** grid points (and component number when dof > 1)



## Output Parameter

- ***gidxm -*** global row indices





## See Also
 `DM`, `DMDA`, `MatStencil`

## Level
intermediate

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex55k.kokkos.cxx.html">src/snes/tutorials/ex55k.kokkos.cxx.html</A><BR>


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


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