<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Jan 16, 2019 at 8:52 AM leejearl <<a href="mailto:leejearl@mail.nwpu.edu.cn">leejearl@mail.nwpu.edu.cn</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"><div style="text-align:left;direction:ltr"><div>Hi Matt,</div><div> Thanks for you reply. If I use DMGlobalToLocal() to update the local vector from global vector.</div><div>The value of cStart<=c<cEndinterior is ok. But the value of cEndInterior<=c<cEnd is not the right value.</div><div> I do not know whether it has something to do with the DMGlobalToLocal(). My problem is as follow.</div><div>After the mesh is distributed , the cells and ghost cells (local vector) look like</div></div></blockquote><div><br></div><div>Hmm, that sounds like a bug, but I have to think a little bit. I don't see how TS ex11 can be working in parallel</div><div>if overlapping cells are not being updated. We should make a small example so that we are certainly comparing the</div><div>same things.</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"><div style="text-align:left;direction:ltr"><div>processor 0: 0, 1, 2, 3, 4 (cell 4 is the ghost cell)</div><div>processor 1: 0, 1, 2, 3, 4 (cell 4 is the ghost cell)</div><div><br></div><div>The value of cell 4 in "processor 0" is same as the value of cell 0 in "processor 1". The value of cell 0 in "processor 1" has</div><div>been set in the global vector. I should copy the corresponding global value of cell 0 in "processor 1" to cell 4 in "processor 0".</div><div><br></div><div>This is my problem. I want to know how to implement it easily. Can you give me some advices?</div><div><br></div><div>Thanks</div><div><br></div><div>leejearl</div><div><br></div><div><br></div><div>On Wed, 2019-01-16 at 08:07 -0500, Matthew Knepley wrote:</div><blockquote type="cite" style="margin:0px 0px 0px 0.8ex;border-left:2px solid rgb(114,159,207);padding-left:1ex"><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" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote type="cite" style="margin:0px 0px 0px 0.8ex;border-left:2px solid rgb(114,159,207);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 type="cite" style="margin:0px 0px 0px 0.8ex;border-left:2px solid rgb(114,159,207);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></div></blockquote><div><span><pre><br></pre></span></div></div>
</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>