petsc-3.7.1 2016-05-15
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 Many br

### Input Parameters

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

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

Many br

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

### 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