<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 12/19/2017 05:50 PM, Matthew Knepley
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMYG4Gm+vS+0Bkm-Gh8zkk0+BswEqNYBbQSaZjhb-+DKeRHtBg@mail.gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Tue, Dec 19, 2017 at 11:40 AM,
            Yann JOBIC <span dir="ltr"><<a
                href="mailto:yann.jobic@univ-amu.fr" target="_blank"
                moz-do-not-send="true">yann.jobic@univ-amu.fr</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
              <br>
              We want to extract the cell connectivity from a DMPlex. We
              have no problem for a sequential run.<br>
            </blockquote>
            <div><br>
            </div>
            <div>Do you want it on disk? If so, you can just DMView()
              for HDF5. That outputs the connectivity in a global
              numbering.</div>
            <div>I can show you the calls I use inside if you want. </div>
          </div>
        </div>
      </div>
    </blockquote>
    I looked at the code, specifically
    DMPlexWriteTopology_Vertices_HDF5_Static<br>
    cellIS should have what i want. <br>
    However it seems that it is not the case. Do i look at the right
    spot in the code ?<br>
    <br>
    I also looked at DMPlexGetCellNumbering, which does exactly what i
    want for the global numbering of Cells, even if the ordering is
    different for different number of processors.<br>
    When i use DMPlexGetVertexNumbering, i've got negative values, which
    is correctly handeled by DMPlexWriteTopology_Vertices_HDF5_Static,
    but i really don't understand this part.<br>
    I succeed in having the coordinates, but maybe not in the right
    order. I reused DMPlexWriteCoordinates_HDF5_Static, which create a
    Vec of vertex coordinates, but i couldn't understand the order of
    vertex coordinate linked (or not) with
    DMPlexWriteTopology_Vertices_HDF5_Static. The number of local
    coordinates is also strange, and does not correspond to the cell's
    topology. <br>
    <br>
    Thanks for the help!<br>
    <br>
    Regards,<br>
    <br>
    Yann<br>
    <br>
    <br>
    <blockquote type="cite"
cite="mid:CAMYG4Gm+vS+0Bkm-Gh8zkk0+BswEqNYBbQSaZjhb-+DKeRHtBg@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div>I usually put</div>
            <div><br>
            </div>
            <div>  DMViewFromOptions(dm, NULL, "-dm_view")</div>
            <div><br>
            </div>
            <div>Then</div>
            <div><br>
            </div>
            <div>  -dm_view hdf5:mesh.h5</div>
            <div><br>
            </div>
            <div>  Thanks,</div>
            <div><br>
            </div>
            <div>    Matt</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              However for parallel ones, we need to get the node
              numbering in the global ordering, as when we distribute
              the mesh, we only have local nodes, and thus local
              numbering.<br>
              <br>
              It seems that we should use DMGetLocalToGlobalMapping (we
              are using Fortran with Petsc 3.8p3). However, we get the
              running error :<br>
              <br>
              [0]PETSC ERROR: No support for this operation for this
              object type<br>
              [0]PETSC ERROR: DM can not create LocalToGlobalMapping<br>
              <br>
              Is it the right way to do it ?<br>
              <br>
              Many thanks,<br>
              <br>
              Regards,<br>
              <br>
              Yann<br>
              <br>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          <div class="gmail_signature" data-smartmail="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>