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

# VecScatterCreateLocal

Creates a VecScatter from a list of messages it must send and receive.

### Synopsis

    #include "petscvec.h"
    PetscErrorCode VecScatterCreateLocal(VecScatter ctx,PetscInt nsends,const PetscInt sendSizes[],const PetscInt sendProcs[],const PetscInt sendIdx[],PetscInt nrecvs,const PetscInt recvSizes[],const PetscInt recvProcs[],const PetscInt recvIdx[],PetscInt bs)

Collective on VecScatter Many br

### Input Parameters

| VecScatter | - obtained with VecScatterCreateEmpty() Many br
| nsends | - Many br
| sendSizes | - Many br
| sendProcs | - Many br
| sendIdx | - indices where the sent entries are obtained from (in local, on process numbering), this is one long array of size \sum_{i=0,i<nsends} sendSizes[i] Many br
| nrecvs | - number of receives to expect Many br
| recvSizes | - Many br
| recvProcs | - processes who are sending to me Many br
| recvIdx | - indices of where received entries are to be put, (in local, on process numbering), this is one long array of size \sum_{i=0,i<nrecvs} recvSizes[i] Many br
| bs | - size of block Many br

Notes: sendSizes[] and recvSizes[] cannot have any 0 entries. If you want to support having 0 entries you need Many brto change the code below to "compress out" the sendProcs[] and recvProcs[] entries that have 0 entries. Many br

Probably does not handle sends to self properly. It should remove those from the counts that are used Many brin allocating space inside of the from struct Many br

Many br

Level:intermediate
Location:src/vec/vec/utils/vpscat.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages