# MatCompositeAddMat
Add another matrix to a composite matrix. 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatCompositeAddMat(Mat mat, Mat smat)
```
Collective on mat


## Input Parameters

- ***mat -*** the composite matrix
- ***smat -*** the partial matrix





## See Also
 `MatCreateComposite()`, `MatCompositeGetMat()`, `MATCOMPOSITE`

## Level
advanced

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/composite/mcomposite.c.html#MatCompositeAddMat_Composite">MatCompositeAddMat_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)  
