# MatCompositeMerge

Given a composite matrix, replaces it with a "regular" matrix by summing all the matrices inside the composite matrix.

### Synopsis

    #include "petscmat.h"
    PetscErrorCode PETSCMAT_DLLEXPORT MatCompositeMerge(Mat mat)

Collective on MPI_Comm

### Input Parameters

mat -the composite matrix

### Options Database

-mat_composite_merge (you must call MatAssemblyBegin()/MatAssemblyEnd() to have this checked) -

### Notes

The MatType of the resulting matrix will be the same as the MatType of the FIRST matrix in the composite matrix.

### See Also

MatDestroy(), MatMult(), MatCompositeAddMat(), MatCreateComposite(), MATCOMPOSITE

Level:advanced
Location: src/mat/impls/composite/mcomposite.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages