<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 1, 2016 at 10:19 AM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> writes:<br>
<br>
> Okay, this shows that we always need to specify exactly which vector,<br>
> local or global, we are talking about (and also why I don't use<br>
> VecGhost).<br>
<br>
</span>Yes, it can be confusing and it wastes storage if you have many global<br>
Vecs (e.g., large Krylov space).<br>
<span class=""><br>
> I was confusing the VecGhostUpdate() above which puts local values in the<br>
> global vector<br>
> with the update which would refresh the local portion. The former update<br>
> should be called<br>
> automatically during assembly, which already happens in the<br>
> FormFunctionLocals,<br>
<br>
</span>Uh, no, and they don't use VecGhost...</blockquote><div><br></div><div>Yes, it most certainly does happen when FormFunctionLocal is used. PETSc calls</div><div>Assembly, at least in the Plex variant. Of course, they do not use VecGhost.</div><div><br></div><div>   Matt</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> and would make sense to have in VecAssembly() for VecGhost I think.<br>
<br>
</span>No.  VecAssembly goes with VecSetValues, which has *nothing* to do with<br>
VecGhost.  If you don't want to use VecSetValues/VecAssembly, then you<br>
can use VecGhost and VecGetArray on the local form, followed by<br>
VecGhostUpdate(x,ADD_VALUES,SCATTER_REVERSE).  You use one or the other;<br>
I don't have any compelling use case for using both and it definitely<br>
wouldn't be typical.<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>