MatSetBlockSizesFromMats — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# MatSetBlockSizesFromMats

Sets the matrix block row and column sizes to match a pair of matrices

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatSetBlockSizesFromMats(Mat mat, Mat fromRow, Mat fromCol)

Logically Collective

## Input Parameters

- mat - the matrix

- fromRow - matrix from which to copy row block size

- fromCol - matrix from which to copy column block size (can be same as fromRow)

## See Also

Matrices, `Mat`, `MatCreateSeqBAIJ()`, `MatCreateBAIJ()`, `MatGetBlockSize()`, `MatSetBlockSizes()`

## Level

developer

## Location

src/mat/interface/matrix.c

## Examples

src/ksp/ksp/tutorials/ex76f.F90
src/ksp/ksp/tutorials/ex76.c

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