ordinary vector to ghost vector

Matthew Knepley knepley at gmail.com
Mon Sep 22 07:51:29 CDT 2008


On Mon, Sep 22, 2008 at 3:08 AM, Håkan Jakobsson
<hakan.jakobsson at math.umu.se> wrote:
> Hi,
> I wounder, is it possible to copy the elements of a vector, created with
> VecCreateMPI, to a vector with ghost values simply using VecCopy and then do
> VecGhostUpdate to initiate the ghost values?

The VecCopy() will copy only the local portion of the vector, and then
the ghost update
will fill in the rest, so I think it will do what you want.

  Matt

> Best Regards,
> Håkan
-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener




More information about the petsc-users mailing list