petsc-3.7.7 2017-09-25
Report Typos and Errors


set the block size for the SPAI preconditioner


#include "petscpc.h" 
PetscErrorCode  PCSPAISetBlockSize(PC pc,int block_size1)

Input Parameters

pc - the preconditioner
n - block size (default 1)

Notes: A block size of 1 treats A as a matrix of scalar elements. A block size of s > 1 treats A as a matrix of sxs blocks. A block size of 0 treats A as a matrix with variable sized blocks, which are determined by searching for dense square diagonal blocks in A. This can be very effective for finite-element matrices.

SPAI will convert A to block form, use a block version of the preconditioner algorithm, and then convert the result back to scalar form.

In many cases the a block-size parameter other than 1 can lead to very significant improvement in performance.

See Also


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