MatCompositeSetMatStructure — PETSc 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# 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

Matrices, `Mat`, `MatAXPY()`, `MatCreateComposite()`, `MatCompositeMerge()`, `MatCompositeGetMatStructure()`, `MATCOMPOSITE`

## Level

advanced

## Location

src/mat/impls/composite/mcomposite.c

## Examples

src/mat/tutorials/ex9.c

## Implementations

MatCompositeSetMatStructure_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