#include "petscvec.h" int VecGhostUpdateBegin(Vec g,InsertMode insertmode,ScatterMode scattermode)Collective on Vec
g | - the vector (obtained with VecCreateGhost() or VecDuplicate()) | |
insertmode | - one of ADD_VALUES or INSERT_VALUES | |
scattermode | - one of SCATTER_FORWARD or SCATTER_REVERSE |
VecGhostUpdateBegin(v,INSERT_VALUES,SCATTER_FORWARD); VecGhostUpdateEnd(v,INSERT_VALUES,SCATTER_FORWARD);
Use the following to accumulate the ghost region values onto the owning processors
VecGhostUpdateBegin(v,ADD_VALUES,SCATTER_REVERSE); VecGhostUpdateEnd(v,ADD_VALUES,SCATTER_REVERSE);
To accumulate the ghost region values onto the owning processors and then update the ghost regions correctly, call the later followed by the former, i.e.,
VecGhostUpdateBegin(v,ADD_VALUES,SCATTER_REVERSE); VecGhostUpdateEnd(v,ADD_VALUES,SCATTER_REVERSE); VecGhostUpdateBegin(v,INSERT_VALUES,SCATTER_FORWARD); VecGhostUpdateEnd(v,INSERT_VALUES,SCATTER_FORWARD);
Level:advanced
Location:src/vec/impls/mpi/pbvec.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages