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

# MatCreateScatter

Creates a new matrix based on a VecScatter

### Synopsis

    #include "petscmat.h"
    PetscErrorCode  MatCreateScatter(MPI_Comm comm,VecScatter scatter,Mat *A)

Collective on MPI_Comm Many br

### Input Parameters

| comm | - MPI communicator Many br
| scatter | - a VecScatterContext Many br

### Output Parameter

A -the matrix Many br

Many br

PETSc requires that matrices and vectors being used for certain Many broperations are partitioned accordingly. For example, when Many brcreating a scatter matrix, A, that supports parallel matrix-vector Many brproducts using MatMult(A,x,y) the user should set the number Many brof local matrix rows to be the number of local elements of the Many brcorresponding result vector, y. Note that this is information is Many brrequired for use of the matrix interface routines, even though Many brthe scatter matrix may not actually be physically partitioned. Many br

### Keywords

matrix, scatter, create

### See Also

MatScatterSetVecScatter(), MatScatterGetVecScatter(), MATSCATTER

Level:intermediate
Location:src/mat/impls/scatter/mscatter.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages