petsc-3.12.5 2020-03-29
Report Typos and Errors

MatCompositeSetMergeType

Sets order of MatCompositeMerge().

Synopsis

#include "petscmat.h" 
PetscErrorCode MatCompositeSetMergeType(Mat mat,MatCompositeMergeType type)
Logically Collective on Mat

Input Parameter

mat - the composite matrix
type - MAT_COMPOSITE_MERGE RIGHT (default) to start merge from right with the first added matrix (mat[0]), MAT_COMPOSITE_MERGE_LEFT to start merge from left with the last added matrix (mat[nmat-1])

Notes

The resulting matrix is the same regardles of the MergeType. Only the order of operation is changed. If set to MAT_COMPOSITE_MERGE_RIGHT the order of the merge is mat[nmat-1]*(mat[nmat-2]*(...*(mat[1]*mat[0]))) otherwise the order is (((mat[nmat-1]*mat[nmat-2])*mat[nmat-3])*...)*mat[0].

See Also

MatCreateComposite(), MatCompositeMerge(), MATCOMPOSITE

Level

advanced

Location

src/mat/impls/composite/mcomposite.c

Examples

src/mat/examples/tutorials/ex9.c.html

Implementations

MatCompositeSetMergeType_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