# MatSetupDM
Sets the `DMDA` that is to be used by the HYPRE_StructMatrix PETSc matrix 
## Synopsis
```
#include "petscdmda.h"     
PetscErrorCode MatSetupDM(Mat mat, DM da)
```
Logically Collective on mat


## Input Parameters

- ***mat -*** the matrix
- ***da -*** the da





## See Also
 `Mat`, `MatSetUp()`

## Level
intermediate

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/da/fdda.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)  
