MatCompositeSetType — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# MatCompositeSetType

Indicates if the matrix is defined as the sum of a set of matrices or the product.

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatCompositeSetType(Mat mat, MatCompositeType type)

Logically Collective

## Input Parameters

- mat - the composite matrix

- type - the `MatCompositeType` to use for the matrix

## See Also

Matrices, `Mat`, `MatDestroy()`, `MatMult()`, `MatCompositeAddMat()`, `MatCreateComposite()`, `MatCompositeGetType()`, `MATCOMPOSITE`, `MatCompositeType`

## Level

advanced

## Location

src/mat/impls/composite/mcomposite.c

## Examples

src/mat/tutorials/ex9.c

## Implementations

MatCompositeSetType_Composite() in src/mat/impls/composite/mcomposite.c

Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages