<div dir="ltr">On Wed, Feb 27, 2013 at 4:56 PM, John Mousel <span dir="ltr"><<a href="mailto:john.mousel@gmail.com" target="_blank">john.mousel@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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<div>

<br></div><div><div>    CALL VecGhostGetLocalForm(solver%u,uk,ierr)</div><div>    CALL VecGhostGetLocalForm(solver%ukm1,ukm1,ierr)</div><div>    CALL VecGhostGetLocalForm(solver%p,pk,ierr)</div><div>    CALL VecGhostGetLocalForm(solver%pkm1,pkm1,ierr)</div>

<div>    CALL VecCopy(uk,ukm1,ierr)</div><div>    CALL VecCopy(pk,pkm1,ierr)</div><div>    CALL VecGhostRestoreLocalForm(solver%u,uk,ierr)</div><div>    CALL VecGhostRestoreLocalForm(solver%ukm1,ukm1,ierr)</div><div>    CALL VecGhostRestoreLocalForm(solver%p,pk,ierr)</div>

<div>    CALL VecGhostRestoreLocalForm(solver%pkm1,pkm1,ierr)</div></div><div><br></div><div>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.</div>
</div></blockquote><div><br></div><div style>Is there something we could do that would be better than you defining a function VecCopyGhosted()?</div><div style><br></div><div style>  Thanks,</div><div style><br></div><div style>
     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class="HOEnZb"><font color="#888888"><div>John</div></font></span></div>
</blockquote></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener
</div></div>