<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Sep 28, 2011, at 6:16 PM, Matthew Knepley wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Wed, Sep 28, 2011 at 4:15 PM, Hui Zhang <span dir="ltr">&lt;<a href="mailto:mike.hui.zhang@hotmail.com">mike.hui.zhang@hotmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><br><div><div class="im"><div>On Sep 28, 2011, at 6:08 PM, Matthew Knepley wrote:</div><br><blockquote type="cite">On Wed, Sep 28, 2011 at 4:05 PM, Hui Zhang <span dir="ltr">&lt;<a href="mailto:mike.hui.zhang@hotmail.com" target="_blank">mike.hui.zhang@hotmail.com</a>&gt;</span> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word"><br><div><div><div>On Sep 28, 2011, at 5:58 PM, Matthew Knepley wrote:</div><br><blockquote type="cite">On Wed, Sep 28, 2011 at 3:54 PM, Hui Zhang <span dir="ltr">&lt;<a href="mailto:mike.hui.zhang@hotmail.com" target="_blank">mike.hui.zhang@hotmail.com</a>&gt;</span> wrote:<br>


<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><span style="font-family:Times"><pre>Hi all,</pre><pre>When using</pre><pre>PetscErrorCode  VecScatterCreate(Vec xin,IS ix,Vec yin,IS iy,VecScatter *newctx)</pre><pre>I want to add those values of xin to the original values of yin.</pre>



<pre>Is there a way to do this without copy of yin?</pre></span></div></blockquote><div>I am not sure what you mean here. Do you want xin == yin?</div></div></blockquote><div><br></div></div><div>No, I mean part of xin is going to be added to part of yin.</div>


</div></div></blockquote><div><br></div><div>Alright. We do not make a copy of yin.</div></div></blockquote><div><br></div></div><div>My fault, the question is not clear. I mean 'add' as 'sum'. I want the resultant 'yin' to have values&nbsp;</div>
<div>y(iy) = y(iy) + x(ix).</div></div></div></blockquote><div><br></div><div>Use ADD_VALUES in VecScatterBegin/End()</div></div></blockquote><div><br></div><div>Yes, thank you! I should read the manual more carefully.</div><div><br></div><br><blockquote type="cite"><div class="gmail_quote"><div><br></div><div>&nbsp; &nbsp;Matt</div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div><div class="im"><blockquote type="cite"><div class="gmail_quote"><div>&nbsp; &nbsp;Matt</div><div><br></div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div style="word-wrap:break-word"><div><div><blockquote type="cite"><div class="gmail_quote"><div>&nbsp; Matt</div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word"><span style="font-family:Times"><pre>Thanks!</pre><pre>Hui</pre></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<br>
</blockquote></div></div><br></div></blockquote></div><br><br clear="all"><div><br></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<br>
</blockquote></div></div><br></div></blockquote></div><br><br clear="all"><div><br></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<br>
</blockquote></div><br></body></html>