:orphan:
# DMMoabSetBlockFills
Sets the fill pattern in each block for a multi-component problem of the matrix returned by `DMCreateMatrix()`. 
## Synopsis
```
#include "petscdmmoab.h"   
PetscErrorCode DMMoabSetBlockFills(DM dm, const PetscInt *dfill, const PetscInt *ofill)
```
Logically Collective


## Input Parameters

- ***dm -*** the `DMMOAB` object
- ***dfill -*** the fill pattern in the diagonal block (may be `NULL`, means use dense block)
- ***ofill -*** the fill pattern in the off-diagonal blocks





## Notes
This only makes sense when you are doing multicomponent problems but using the
MPIAIJ matrix format

The format for dfill and ofill is a 2 dimensional dof by dof matrix with 1 entries
representing coupling and 0 entries for missing coupling. For example
```none
             dfill[9] = {1, 0, 0,
                         1, 1, 0,
                         0, 1, 1}
```

means that row 0 is coupled with only itself in the diagonal block, row 1 is coupled with
itself and row 0 (in the diagonal block) and row 2 is coupled with itself and row 1 (in the
diagonal block).

`DMDASetGetMatrix()` allows you to provide general code for those more complicated nonzero patterns then
can be represented in the dfill, ofill format

Contributed by Glenn Hammond


## See Also
`DMCreateMatrix()`, `DMDASetGetMatrix()`, `DMSetMatrixPreallocateOnly()`


## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/moab/dmmbmat.cxx.html#DMMoabSetBlockFills">src/dm/impls/moab/dmmbmat.cxx</A>


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


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