petsc-3.8.4 2018-03-24
Report Typos and Errors

MatSetBlockSize

Sets the matrix block size.

Synopsis

#include "petscmat.h" 
PetscErrorCode MatSetBlockSize(Mat mat,PetscInt bs)
Logically Collective on Mat

Input Parameters

mat - the matrix
bs - block size

Notes

Block row formats are MATSEQBAIJ, MATMPIBAIJ, MATSEQSBAIJ, MATMPISBAIJ. These formats ALWAYS have square block storage in the matrix. This must be called before MatSetUp() or MatXXXSetPreallocation() (or will default to 1) and the block size cannot be changed later.

For MATMPIAIJ and MATSEQAIJ matrix formats, this function can be called at a later stage, provided that the specified block size is compatible with the matrix local sizes.

See Also

MatCreateSeqBAIJ(), MatCreateBAIJ(), MatGetBlockSize(), MatSetBlockSizes(), MatGetBlockSizes()

Level:intermediate
Location:
src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/ksp/ksp/examples/tutorials/ex49.c.html
src/ksp/ksp/examples/tutorials/ex55.c.html
src/ksp/ksp/examples/tutorials/ex56.c.html