On Wed, Feb 27, 2013 at 4:56 PM, John Mousel <john.mousel at gmail.com> wrote:
> Is there a possibility of adding a wrapper function around a few basic > vector operations such as VecCopy, VecAXPY, VECAXPYPZ... to operate on > ghosted vectors? I perform a lot of vector operations including the ghost > region to avoid communication. It really clutters code to see stuff like > > CALL VecGhostGetLocalForm(solver%u,uk,ierr) > CALL VecGhostGetLocalForm(solver%ukm1,ukm1,ierr) > CALL VecGhostGetLocalForm(solver%p,pk,ierr) > CALL VecGhostGetLocalForm(solver%pkm1,pkm1,ierr) > CALL VecCopy(uk,ukm1,ierr) > CALL VecCopy(pk,pkm1,ierr) > CALL VecGhostRestoreLocalForm(solver%u,uk,ierr) > CALL VecGhostRestoreLocalForm(solver%ukm1,ukm1,ierr) > CALL VecGhostRestoreLocalForm(solver%p,pk,ierr) > CALL VecGhostRestoreLocalForm(solver%pkm1,pkm1,ierr) > > Maybe there's a good reason for this not already existing, or maybe it > does exist and I haven't found it, but I'd think something like > VecCopyGhosted would be fairly useful. > Is there something we could do that would be better than you defining a function VecCopyGhosted()? Thanks, Matt > 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-dev/attachments/20130227/9acf1462/attachment.html>