<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 2019-11-26 10:18 a.m., Matthew
      Knepley wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMYG4Gn+yQMt9ZhNF9yy7tP5gOkm2Bz+DVA5ahjrOZf_Ttxf8Q@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">On Tue, Nov 26, 2019 at 11:43 AM Danyang Su <<a
            href="mailto:danyang.su@gmail.com" moz-do-not-send="true">danyang.su@gmail.com</a>>
          wrote:<br>
        </div>
        <div class="gmail_quote">
          <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">
              <div>On 2019-11-25 7:54 p.m., Matthew Knepley wrote:<br>
              </div>
              <blockquote type="cite">
                <div dir="ltr">
                  <div dir="ltr">On Mon, Nov 25, 2019 at 6:25 PM
                    Swarnava Ghosh <<a
                      href="mailto:swarnava89@gmail.com" target="_blank"
                      moz-do-not-send="true">swarnava89@gmail.com</a>>
                    wrote:<br>
                  </div>
                  <div class="gmail_quote">
                    <blockquote class="gmail_quote" style="margin:0px
                      0px 0px 0.8ex;border-left:1px solid
                      rgb(204,204,204);padding-left:1ex">
                      <div dir="ltr">Dear PETSc users and developers,
                        <div><br>
                        </div>
                        <div>I am working with dmplex to distribute a 3D
                          unstructured mesh made of tetrahedrons in a
                          cuboidal domain. I had a few queries:</div>
                        <div>1) Is there any way of ensuring load
                          balancing based on the number of vertices per
                          MPI process.</div>
                      </div>
                    </blockquote>
                    <div><br>
                    </div>
                    <div>You can now call DMPlexRebalanceSharedPoints()
                      to try and get better balance of vertices.</div>
                  </div>
                </div>
              </blockquote>
              <p>Hi Matt,</p>
              <p>I just want to follow up if this new function can help
                to solve the "Strange Partition in PETSc 3.11" problem I
                mentioned before. Would you please let me know when
                shall I call this function? Right before
                DMPlexDistribute?</p>
            </div>
          </blockquote>
          <div>This is not the problem. I believe the problem is that
            you are partitioning hybrid cells, and the way we handle</div>
          <div>them internally changed, which I think screwed up the
            dual mesh for partitioning in your example. I have been</div>
          <div>sick, so I have not gotten to your example yet, but I
            will.</div>
        </div>
      </div>
    </blockquote>
    <p>Hope you are getting well soon. The mesh is not hybrid, only
      prism cells layer by layer. But the height of the prism varies
      significantly.</p>
    <p>Thanks,</p>
    <p>Danyang<br>
    </p>
    <blockquote type="cite"
cite="mid:CAMYG4Gn+yQMt9ZhNF9yy7tP5gOkm2Bz+DVA5ahjrOZf_Ttxf8Q@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_quote">
          <div><br>
          </div>
          <div>  Sorry about that,</div>
          <div><br>
          </div>
          <div>    Matt <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 bgcolor="#FFFFFF">
              <p>call DMPlexCreateFromCellList<br>
                <br>
                call DMPlexGetPartitioner<br>
                <br>
                call PetscPartitionerSetFromOptions<br>
                <br>
                call DMPlexDistribute</p>
              <p>Thanks,</p>
              <p>Danyang<br>
              </p>
              <blockquote type="cite">
                <div dir="ltr">
                  <div class="gmail_quote">
                    <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 dir="ltr">
                        <div>2) As the global domain is cuboidal, is the
                          resulting domain decomposition also cuboidal
                          on every MPI process? If not, is there a way
                          to ensure this? For example in DMDA, the
                          default domain decomposition for a cuboidal
                          domain is cuboidal. </div>
                      </div>
                    </blockquote>
                    <div><br>
                    </div>
                    <div>It sounds like you do not want something that
                      is actually unstructured. Rather, it seems like
                      you want to</div>
                    <div>take a DMDA type thing and split it into tets.
                      You can get a cuboidal decomposition of a hex mesh
                      easily.</div>
                    <div>Call DMPlexCreateBoxMesh() with one cell for
                      every process, distribute, and then uniformly
                      refine. This</div>
                    <div>will not quite work for tets since the mesh
                      partitioner will tend to violate that constraint.
                      You could:</div>
                    <div><br>
                    </div>
                    <div>  a) Prescribe the distribution yourself using
                      the Shell partitioner type</div>
                    <div><br>
                    </div>
                    <div>or</div>
                    <div><br>
                    </div>
                    <div>  b) Write a refiner that turns hexes into tets</div>
                    <div><br>
                    </div>
                    <div>We already have a refiner that turns tets into
                      hexes, but we never wrote the other direction
                      because it was not clear</div>
                    <div>that it was useful.</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 dir="ltr">
                        <div>Sincerely,</div>
                        <div>SG</div>
                      </div>
                    </blockquote>
                  </div>
                  <br clear="all">
                  <div><br>
                  </div>
                  -- <br>
                  <div dir="ltr">
                    <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" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </blockquote>
            </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" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>