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. John -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130227/476d9aba/attachment.html>