petsc-3.7.1 2016-05-15
Report Typos and Errors

# MatCreateSeqSBAIJWithArrays

Creates an sequential SBAIJ matrix using matrix elements (upper triangular entries in CSR format) provided by the user.

### Synopsis

    #include "petscmat.h"
    PetscErrorCode  MatCreateSeqSBAIJWithArrays(MPI_Comm comm,PetscInt bs,PetscInt m,PetscInt n,PetscInt *i,PetscInt *j,PetscScalar *a,Mat *mat)

Collective on MPI_Comm Many br

### Input Parameters

| comm | - must be an MPI communicator of size 1 Many br
| bs | - size of block Many br
| m | - number of rows Many br
| n | - number of columns Many br
| i | - row indices Many br
| j | - column indices Many br
| a | - matrix values Many br

### Output Parameter

mat -the matrix Many br

Many br

### Notes

The i, j, and a arrays are not copied by this routine, the user must free these arrays Many bronce the matrix is destroyed Many br

You cannot set new nonzero locations into this matrix, that will generate an error. Many br

The i and j indices are 0 based Many br

When block size is greater than 1 the matrix values must be stored using the SBAIJ storage format (see the SBAIJ code to determine this). For block size of 1 Many brit is the regular CSR format excluding the lower triangular elements. Many br

### See Also

MatCreate(), MatCreateSBAIJ(), MatCreateSeqSBAIJ()

Level:advanced
Location:src/mat/impls/sbaij/seq/sbaij.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages