<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 18-03-02 10:58 AM, Matthew Knepley wrote:<br>
    <blockquote type="cite"
cite="mid:CAMYG4GknaFdad5T=FdBtj1ivUWSq1Xxq+f4B=LQLrz1dSDDKfg@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Fri, Mar 2, 2018 at 1:41 PM,
            Danyang Su <span dir="ltr"><<a
                href="mailto:danyang.su@gmail.com" target="_blank"
                moz-do-not-send="true">danyang.su@gmail.com</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">
              <div bgcolor="#FFFFFF"> <br>
                <div class="gmail-m_-4654060630000521438moz-cite-prefix">On
                  18-02-19 03:30 PM, Matthew Knepley wrote:<br>
                </div>
                <blockquote type="cite">
                  <div dir="ltr">
                    <div class="gmail_extra">
                      <div class="gmail_quote">On Mon, Feb 19, 2018 at
                        3:11 PM, Danyang Su <span dir="ltr"><<a
                            href="mailto:danyang.su@gmail.com"
                            target="_blank" moz-do-not-send="true">danyang.su@gmail.com</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 Matt,<br>
                          <br>
                          Would you please let me know how to check if a
                          cell is local owned? When overlap is 0 in
                          DMPlexDistribute, all the cells are local
                          owned. How about overlap > 0? It sounds
                          like impossible to check by node because a
                          cell can be local owned even if none of the
                          nodes in this cell is local owned.<br>
                        </blockquote>
                        <div><br>
                        </div>
                        <div>If a cell is in the PetscSF, then it is not
                          locally owned. The local nodes in the SF are
                          sorted, so I use</div>
                        <div>PetscFindInt (<a
href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscFindInt.html"
                            target="_blank" moz-do-not-send="true">http://www.mcs.anl.gov/petsc/<wbr>petsc-current/docs/<wbr>manualpages/Sys/PetscFindInt.<wbr>html</a>).</div>
                      </div>
                    </div>
                  </div>
                </blockquote>
                Hi Matt,<br>
                <br>
                Would you please give me a little more about how to mark
                the ghost cells when overlap > 0? What do you mean a
                cell is in the PetscSF? I use PetscSFView to export the
                graph (original mesh file pile.vtk) and it exports all
                the cells, including the ghost cells (PETScSFView.txt).<br>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>Yes, I will send you some sample code when I get time.
              The first problem is that you are looking at a different
              PetscSF. This looks like the</div>
            <div>one returned by DMPlexDistribute(). This is mapping the
              serial mesh to the parallel mesh. You want</div>
            <div><br>
            </div>
            <div>  <a
href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMGetPointSF.html"
                moz-do-not-send="true">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMGetPointSF.html</a></div>
            <div><br>
            </div>
            <div>Then you can look at</div>
            <div><br>
            </div>
            <div>  <a
href="https://bitbucket.org/petsc/petsc/src/1788fc36644e622df8cb1a0de85676ccc5af0239/src/dm/impls/plex/plexsubmesh.c?at=master&fileviewer=file-view-default#plexsubmesh.c-683"
                moz-do-not-send="true">https://bitbucket.org/petsc/petsc/src/1788fc36644e622df8cb1a0de85676ccc5af0239/src/dm/impls/plex/plexsubmesh.c?at=master&fileviewer=file-view-default#plexsubmesh.c-683</a></div>
            <div><br>
            </div>
            <div>I get the pointSF, get out the list of leaves, and find
              points in it using PetscFindInt()</div>
          </div>
        </div>
      </div>
    </blockquote>
    Thanks Matt. I will try to figure it out based on your provided link
    and will let you know if I get it work.<br>
    <br>
    Danyang<br>
    <blockquote type="cite"
cite="mid:CAMYG4GknaFdad5T=FdBtj1ivUWSq1Xxq+f4B=LQLrz1dSDDKfg@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <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 bgcolor="#FFFFFF"> Thanks,<br>
                <br>
                Danyang <br>
                <blockquote type="cite">
                  <div dir="ltr">
                    <div class="gmail_extra">
                      <div class="gmail_quote">
                        <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"> Thanks,<br>
                          <br>
                          Danyang<span class="gmail-HOEnZb"><font
                              color="#888888"><br>
                            </font></span></blockquote>
                        <span class="gmail-HOEnZb"><font color="#888888">
                          </font></span></div>
                      <span class="gmail-HOEnZb"><font color="#888888">
                          -- <br>
                          <div
class="gmail-m_-4654060630000521438gmail-m_-8557986044721592658gmail_signature">
                            <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.caam.rice.edu/%7Emk51/"
                                      target="_blank"
                                      moz-do-not-send="true">https://www.cse.buffalo.edu/~k<wbr>nepley/</a><br>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </font></span></div>
                  </div>
                </blockquote>
                <br>
              </div>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          <div class="gmail_signature">
            <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.caam.rice.edu/%7Emk51/"
                      target="_blank" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>