petsc-3.7.3 2016-08-01
Report Typos and Errors

MatISSetPreallocation

Preallocates memory for a MATIS parallel matrix.

Synopsis

#include "petscmat.h" 
PetscErrorCode  MatISSetPreallocation(Mat B,PetscInt d_nz,const PetscInt d_nnz[],PetscInt o_nz,const PetscInt o_nnz[])
Collective on MPI_Comm

Input Parameters

B - the matrix
d_nz - number of nonzeros per row in DIAGONAL portion of local submatrix (same value is used for all local rows)
d_nnz - array containing the number of nonzeros in the various rows of the DIAGONAL portion of the local submatrix (possibly different for each row) or NULL, if d_nz is used to specify the nonzero structure. The size of this array is equal to the number of local rows, i.e 'm'. For matrices that will be factored, you must leave room for (and set) the diagonal entry even if it is zero.
o_nz - number of nonzeros per row in the OFF-DIAGONAL portion of local submatrix (same value is used for all local rows).
o_nnz - array containing the number of nonzeros in the various rows of the OFF-DIAGONAL portion of the local submatrix (possibly different for each row) or NULL, if o_nz is used to specify the nonzero structure. The size of this array is equal to the number of local rows, i.e 'm'.

If the *_nnz parameter is given then the *_nz parameter is ignored

Notes: This function has the same interface as the MPIAIJ preallocation routine in order to simplify the transition from the asssembled format to the unassembled one. It overestimates the preallocation of MATIS local matrices; for exact preallocation, the user should set the preallocation directly on local matrix objects.

Keywords

matrix

See Also

MatCreate(), MatCreateIS(), MatMPIAIJSetPreallocation(), MatISGetLocalMat()

Level:intermediate
Location:
src/mat/impls/is/matis.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages