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
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_INTEGERin Fortran), ifd_nzis used to specify the nonzero structure. The size of this array is equal to the number of local rows, i.em. 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_INTEGERin Fortran), ifo_nzis used to specify the nonzero structure. The size of this array is equal to the number of local rows, i.em.
Note#
If the *nnz parameter is given then the *nz parameter is ignored; for sequential matrices, onz and onnz are ignored.
See Also#
Matrices, Mat, MatCreate(), MatMPIAIJSetPreallocation(), MATHYPRE, MATAIJ
Level#
intermediate
Location#
Examples#
Implementations#
MatHYPRESetPreallocation_HYPRE() in src/mat/impls/hypre/mhypre.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages