[petsc-users] Destroy ghosted vector that was used to duplicate

Matthew Knepley knepley at gmail.com
Wed Jun 19 14:42:48 CDT 2013


On Wed, Jun 19, 2013 at 6:24 PM, John Mousel <john.mousel at gmail.com> wrote:

> Is it legal to destroy a ghosted vector if it has been used in
> VecDuplicate?
>

This is fine.

   MAtt


> Something like:
>
> VecCreateGhost(...,vec1)
> VecDuplicate(vec1,vec2)
> VecDuplicate(vec1,vec3)
> VecDestroy(vec1)
> VecAXPY(vec2,1.0,vec3)
>
> Is this legal or are the scatters left hanging in the ether?
>
>
> John
>



-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130619/eb202a1c/attachment.html>


More information about the petsc-users mailing list