petsc-3.6.1 2015-08-06
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

Input Parameters

VecScatter - obtained with VecScatterCreateEmpty()
nsends -
sendSizes -
sendProcs -
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]
nrecvs - number of receives to expect
recvSizes -
recvProcs - processes who are sending to me
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]
bs - size of block

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

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

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