Matthew Knepley knepley at
Thu Apr 2 14:59:45 CDT 2009

On Thu, Apr 2, 2009 at 2:46 PM, Khan, Irfan <irfan.khan at> wrote:

> Does VecSwap() copy ghost entries too. i.e. if I have two similar parallel
> ghosted vectors, then swaping them using VecSwap(), would it also swap the
> local ghost entries of the two vectors?
> It doesn't seem to do so, please let me know if I am wrong.

No, VecSwap() does not swap ghost values as it is intended to be purely
local. You can call GhostUpdate()
afterwards to get this behavior.


> Thank you
> Irfan
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the petsc-users mailing list