# MatCompositeSetMatStructure
Indicates structure of matrices in the composite matrix. 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatCompositeSetMatStructure(Mat mat, MatStructure str)
```
Not Collective


## Input Parameters

- ***mat -*** the composite matrix
- ***str -*** either `SAME_NONZERO_PATTERN`, `DIFFERENT_NONZERO_PATTERN` (default) or `SUBSET_NONZERO_PATTERN`





## Note
Information about the matrices structure is used in `MatCompositeMerge()` for additive composite matrix.


## See Also
 `MatAXPY()`, `MatCreateComposite()`, `MatCompositeMerge()` `MatCompositeGetMatStructure()`, `MATCOMPOSITE`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/composite/mcomposite.c.html#MatCompositeSetMatStructure">src/mat/impls/composite/mcomposite.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/tutorials/ex9.c.html">src/mat/tutorials/ex9.c.html</A><BR>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/composite/mcomposite.c.html#MatCompositeSetMatStructure_Composite">MatCompositeSetMatStructure_Composite in src/mat/impls/composite/mcomposite.c</A><BR>


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


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