petsc-3.7.3 2016-07-24
Report Typos and Errors

# MatCreateNest

Creates a new matrix containing several nested submatrices, each stored separately

### Synopsis

    #include "petscmat.h"
    PetscErrorCode MatCreateNest(MPI_Comm comm,PetscInt nr,const IS is_row[],PetscInt nc,const IS is_col[],const Mat a[],Mat *B)

Collective on Mat

### Input Parameter

| comm | - Communicator for the new Mat
| nr | - number of nested row blocks
| is_row | - index sets for each nested row block, or NULL to make contiguous
| nc | - number of nested column blocks
| is_col | - index sets for each nested column block, or NULL to make contiguous
| a | - row-aligned array of nr*nc submatrices, empty submatrices can be passed using NULL

### Output Parameter

B -new matrix

### See Also

MatCreate(), VecCreateNest(), DMCreateMatrix(), MATNEST

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

### Examples

src/snes/examples/tutorials/ex70.c.html