MatCreateIS — PETSc 3.25.0 documentation

Skip to main content
`Ctrl`+`K`

# MatCreateIS

Creates a “process” unassembled matrix.

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatCreateIS(MPI_Comm comm, PetscInt bs, PetscInt m, PetscInt n, PetscInt M, PetscInt N, ISLocalToGlobalMapping rmap, ISLocalToGlobalMapping cmap, Mat *A)

Collective.

## Input Parameters

- comm - MPI communicator that will share the matrix

- bs - block size of the matrix

- m - local size of left vector used in matrix vector products

- n - local size of right vector used in matrix vector products

- M - global size of left vector used in matrix vector products

- N - global size of right vector used in matrix vector products

- rmap - local to global map for rows

- cmap - local to global map for cols

## Output Parameter

- A - the resulting matrix

## Notes

`m` and `n` are NOT related to the size of the map; they represent the size of the local parts of the distributed vectors used in `MatMult()` operations. The local sizes of `rmap` and `cmap` define the size of the local matrices.

If `rmap` (`cmap`) is `NULL`, then the local row (column) spaces matches the global space.

## See Also

Matrices, `Mat`, `MATIS`, `MatSetLocalToGlobalMapping()`

## Level

intermediate

## Location

src/mat/impls/is/matis.c

## Examples

src/ksp/ksp/tutorials/ex59.c
src/mat/tutorials/ex3.c

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