<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Jan 15, 2019 at 8:34 PM leejearl via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all Petscer,<br>
<br>
I have a question about how to update the ghost value in the vector.<br>
The prolblem is as follow.<br>
<br>
1. A dmplex dm object is created using DMPlexCreateFromFile<br>
2. The dm is distributed using DMPlexDistribute, and the overlap is set<br>
as 1.<br>
3. The ghosted dm is constructed by DMConstructGhostCells.<br>
4. A global Vector X and a local vector localX are created by<br>
DMCreateGlobalVector and DMCreateLocalVector<br>
<br>
Now, the problem is that the ghost value are needed in the computation<br>
using local vector localX. and the ghost value must be update from the<br>
global vector. <br>
<br>
For example, gCellId is the index of ghost cell in the local vector<br>
localX of process 0, and cellId is the index of cell in the global<br>
vector of process 1. I must update the data of cellId to gCellId. How<br>
can I do it easily?<br>
<br>
I can implement it use the PetscSFBcastBegin/PetscSFBcastEnd. Is there<br>
other simple way to do it?<br></blockquote><div><br></div><div>Doesn't DMGlobalToLocal() work?</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Any helps are appreciated.<br>
<br>
Thanks.<br>
<br>
<br>
<br>
leejearl<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>