Combine ghost updates

billy at dem.uminho.pt billy at dem.uminho.pt
Tue Apr 4 09:20:31 CDT 2006


Hi,

I read in a paper that if you combine all updates in a single vector, you can
speed up the comunication. They combined gradient x, y, z values in one vector.
Does anyone know how this can be done? 

For example vectors ux, uy, and uz:

VecGhostUpdateBegin(ux,INSERT_VALUES,SCATTER_FORWARD);
VecGhostUpdateEnd(ux,INSERT_VALUES,SCATTER_FORWARD);

VecGhostUpdateBegin(uy,INSERT_VALUES,SCATTER_FORWARD);
VecGhostUpdateEnd(uy,INSERT_VALUES,SCATTER_FORWARD);

VecGhostUpdateBegin(uz,INSERT_VALUES,SCATTER_FORWARD);
VecGhostUpdateEnd(uz,INSERT_VALUES,SCATTER_FORWARD);

Could they be combined in a vector U:

VecGhostUpdateBegin(U,INSERT_VALUES,SCATTER_FORWARD);
VecGhostUpdateEnd(U,INSERT_VALUES,SCATTER_FORWARD);

and would it be faster?


Billy.




More information about the petsc-users mailing list