<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Dec 1, 2016 at 8:48 AM, Eric Chamberland <span dir="ltr"><<a href="mailto:Eric.Chamberland@giref.ulaval.ca" target="_blank">Eric.Chamberland@giref.ulaval.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I try to find how to zeros all vec entries, including ghosts, without doing any communications...<br>
<br>
Since VecSet does not modify ghost values, we can do<br>
<br>
VecGhostUpdateBegin(v,INSERT_V<wbr>ALUES,SCATTER_FORWARD);<br>
VecGhostUpdateEnd(v,INSERT_VAL<wbr>UES,SCATTER_FORWARD);<br>
<br>
But that is somewhat "heavy" just to put zeros in a vec on all processes...<br>
<br>
Shouldn't VecZeroEntries be the function that should do the work correctly?<br></blockquote><div><br></div><div>How about</div><div><br></div>VecGhostGetLocalForm(x,&xlocal);<br>VecZeroEntries(xlocal);<br>VecGhostRestoreLocalForm(x,&xlocal);</div><div class="gmail_quote"><br></div><div class="gmail_quote">  Thanks,</div><div class="gmail_quote"><br></div><div class="gmail_quote">     Matt<br><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks,<br>
<br>
Eric<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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></div>