petsc-3.10.5 2019-03-28
Report Typos and Errors

MatSeqAIJSetPreallocationCSR

Allocates memory for a sparse sequential matrix in AIJ format.

Synopsis

#include "petscmat.h" 
PetscErrorCode MatSeqAIJSetPreallocationCSR(Mat B,const PetscInt i[],const PetscInt j[],const PetscScalar v[])

Input Parameters

B - the matrix
i - the indices into j for the start of each row (starts with zero)
j - the column indices for each row (starts with zero) these must be sorted for each row
v - optional values in the matrix

The i,j,v values are COPIED with this routine; to avoid the copy use MatCreateSeqAIJWithArrays()

Keywords

matrix, aij, compressed row, sparse, sequential

See Also

MatCreate(), MatCreateSeqAIJ(), MatSetValues(), MatSeqAIJSetPreallocation(), MatCreateSeqAIJ(), MATSEQAIJ

Level

developer

Location

src/mat/impls/aij/seq/aij.c

Implementations

MatSeqAIJSetPreallocationCSR_SeqAIJ in src/mat/impls/aij/seq/aij.c

Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages