#include "petscvec.h" PetscErrorCode PETSCVEC_DLLEXPORT VecScatterCreateToZero(Vec vin,VecScatter *ctx,Vec *vout)Collective
ctx | - scatter context | |
vout | - output SEQVEC that is large enough to scatter into on processor 0 and of length zero on all other processors |
Note: vout may be PETSC_NULL [PETSC_NULL_OBJECT from fortran] if you do not need to have it created
VecScatterCreateToZero(vin,&ctx,&vout);
// scatter as many times as you need
VecScatterBegin(vin,vout,INSERT_VALUES,SCATTER_FORWARD,ctx);
VecScatterEnd(vin,vout,INSERT_VALUES,SCATTER_FORWARD,ctx);
// destroy scatter context and local vector when no longer needed
VecScatterDestroy(ctx);
VecDestroy(vout);
Level:intermediate
Location:src/vec/vec/utils/vecmpitoseq.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages