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

MatHYPRESetPreallocation

Preallocates memory for a sparse parallel matrix in HYPRE IJ format

Synopsis

PetscErrorCode MatHYPRESetPreallocation(Mat A, PetscInt dnz, const PetscInt dnnz[], PetscInt onz, const PetscInt onnz[])
Collective on Mat

Input Parameters

A - the matrix
dnz - number of nonzeros per row in DIAGONAL portion of local submatrix (same value is used for all local rows)
dnnz - 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 (PETSC_NULL_INTEGER in Fortran), 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.
onz - number of nonzeros per row in the OFF-DIAGONAL portion of local submatrix (same value is used for all local rows).
onnz - 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 (PETSC_NULL_INTEGER in Fortran), 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'.

Notes: If the *nnz parameter is given then the *nz parameter is ignored; for sequential matrices, onz and onnz are ignored.

Keywords

matrix, aij, compressed row, sparse, parallel

See Also

MatCreate(), MatMPIAIJSetPreallocation, MATHYPRE

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