#include "petscmat.h" PetscErrorCode MatSeqSBAIJSetPreallocation(Mat B,PetscInt bs,PetscInt nz,const PetscInt nnz[])Collective on Mat Many br
B | - the symmetric matrix Many br | |
bs | - size of block, the blocks are ALWAYS square. One can use MatSetBlockSizes() to set a different row and column blocksize but the row Many brblocksize always defines the size of the blocks. The column blocksize sets the blocksize of the vectors obtained with MatCreateVecs() Many br | |
nz | - number of block nonzeros per block row (same for all rows) Many br | |
nnz | - array containing the number of block nonzeros in the upper triangular plus Many brdiagonal portion of each block (possibly different for each block row) or NULL Many br |
Many br
You can call MatGetInfo() to get information on how effective the preallocation was; Many brfor example the fields mallocs,nz_allocated,nz_used,nz_unneeded; Many brYou can also run with the option -info and look for messages with the string Many brmalloc in them to see if additional memory allocation was needed. Many br
If the nnz parameter is given then the nz parameter is ignored Many br
Level:intermediate
Location:src/mat/impls/sbaij/seq/sbaij.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages