Actually it looks like a simple VecCopy() works in this situation.

It checks the local sizes of the two vectors, and decides they are still the same, so is happy to do the copy.

- Adrian

On 18/07/19 10:31 AM, Adrian Croucher wrote:
hi

I have a Vec created on a distributed DMPlex (using DMCreateGlobalVector() or DMCreateLocalVector()).

I then add FV boundary condition cells to the DMPlex, using DMPlexConstructGhostCells().

I can then create a new Vec on the new DM. What is the best way to copy the values from the old Vec to the new one?

Regards, Adrian

--
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: [email protected]
tel: +64 (0)9 923 4611

Reply via email to