<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hello,<br>
      <br>
      I tried the "next" branch  from the git repository.<br>
      The function PetscDSAddBoundary correctly set the boundary values,
      but there is still the bug of the boundary applied to the whole
      element.<br>
      I'll dig a little in DMPlexVecSetFieldClosure_Internal() of
      knepley/fix-plex-bc-multiple where the possible bug should be.<br>
      <br>
      I now use a simple Poisson FE test case in order to check the
      boundaries.<br>
      <br>
      I hope these details helps a little...<br>
      <br>
      Regards,<br>
      <br>
      Yann<br>
      <br>
      <br>
      Le 24/11/2017 à 11:34, Yann Jobic a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:b9e3cc25-cedf-4a17-c0c2-2524180f988d@univ-amu.fr">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div class="moz-cite-prefix">Le 23/11/2017 à 13:45, Matthew
        Knepley a écrit :<br>
      </div>
      <blockquote type="cite"
cite="mid:CAMYG4G=Mi_gfeu8aM-jMLx_Zxk1nyk69QOWOjKga1W2deO3GmQ@mail.gmail.com">
        <div dir="ltr">
          <div class="gmail_extra">
            <div class="gmail_quote">On Thu, Nov 23, 2017 at 3:39 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">
                <div text="#000000" bgcolor="#FFFFFF">
                  <div class="m_2693683614766768657moz-cite-prefix">Hello,<br>
                    <br>
                    I checked out  the branch
                    knepley/fix-plex-bc-multiple, but i now have a
                    strange problem.<br>
                    I splited my labels as in ex69.c of snes. It may be
                    the right way to do it.<br>
                    In petsc 3.8.2, i have the same behavior as before,
                    the element containing the face is called by
                    PetscDSAddBoundary.<br>
                    In the git version, PetscDSAddBoundary does not call
                    my boundary function at all.<br>
                    The call :<br>
                      ierr = PetscDSAddBoundary(prob, DM_BC_ESSENTIAL,
                    "wallL", "markerLeft",   0, Ncomp, components, (void
                    (*)(void)) uIn,  1, &id, ctx);CHKERRQ(ierr);<br>
                    <br>
                    I checked that my labels are correct :<br>
                      markerLeft: 1 strata with value/size (1 (11))<br>
                      markerTop: 1 strata with value/size (1 (11))<br>
                      markerRight: 1 strata with value/size (1 (11))<br>
                      markerBottom: 1 strata with value/size (1 (11))<br>
                    <br>
                    What am i doing wrong ?<br>
                  </div>
                </div>
              </blockquote>
              <div><br>
              </div>
              <div>So you call AddBoundary() and then the boundary
                values are never inserted? The call looks correct. Can
                you send me an example to check?</div>
              <div>Obviously this works for my simple examples in the
                repo. I can't see by looking what might be wrong for
                you.</div>
            </div>
          </div>
        </div>
      </blockquote>
      Hello,<br>
      I may have the wrong git directory.<br>
      I've got the message when i'm compiling :<br>
      The version of PETSc you are using is out-of-date, we recommend
      updating to the new release<br>
       Available Version: 3.8.2   Installed Version: 3.8<br>
      <br>
      As i'm not familiar with git, I've done :<br>
      git clone <a class="moz-txt-link-freetext"
        href="https://bitbucket.org/petsc/petsc" moz-do-not-send="true">https://bitbucket.org/petsc/petsc</a><br>
      git checkout knepley/fix-plex-bc-multiple<br>
      <br>
      With this petsc version, ex46 and ex47 are not working (from TS),
      and after calling PetscDSAddBoundary, it seems that the boundary
      values are never inserted, as in my own code.<br>
      <br>
      Do i have the right petsc development version ?<br>
      <br>
      Thanks,<br>
      <br>
      Regards,<br>
      <br>
      Yann<br>
      <br>
      PS : In my old code, i've tried to mix ex56 and ex69 for marking
      boundary values. <br>
      I first set labels for "Faces", and using this label, i create new
      separated ones (North, South, ...).<br>
      It worked in sequential, but in parallel, the program hang at
      DMPlexCreateClosureIndex.<br>
      So i just kept "Faces", as in ex56, and it worked in parallel.<br>
      <br>
      <blockquote type="cite"
cite="mid:CAMYG4G=Mi_gfeu8aM-jMLx_Zxk1nyk69QOWOjKga1W2deO3GmQ@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:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div text="#000000" bgcolor="#FFFFFF">
                  <div class="m_2693683614766768657moz-cite-prefix">
                    Thanks,<br>
                    <br>
                    Regards,<span class=""><br>
                      <br>
                      Yann<br>
                      <br>
                      Le 22/11/2017 à 18:51, Matthew Knepley a écrit :<br>
                    </span></div>
                  <div>
                    <div class="h5">
                      <blockquote type="cite">
                        <div dir="ltr">
                          <div class="gmail_extra">
                            <div class="gmail_quote">On Wed, Nov 22,
                              2017 at 12:39 PM, 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>
                                I've found a strange behavior when
                                looking into a bug for the pressure
                                convergence of a simple Navier-Stokes
                                problem using PetscFE.<br>
                                <br>
                                I followed many examples for labeling
                                boundary faces. I first use
                                DMPlexMarkBoundaryFaces, (label=1 to the
                                faces).<br>
                                I find those faces using DMGetStratumIS
                                and searching 1 as it is the value of
                                the marked boundary faces.<br>
                                Finally i use DMPlexLabelComplete over
                                the new label.<br>
                                I then use :<br>
                                  ierr = PetscDSAddBoundary(prob,
                                DM_BC_ESSENTIAL, "in", "Faces", 0,
                                Ncomp, components, (void (*)(void)) uIn,
                                NWest, west, NULL);CHKERRQ(ierr);<br>
                                in order to impose a dirichlet condition
                                for the faces labeled by the correct
                                value (west=1, south=3,...).<br>
                                <br>
                                However, the function "uIn()" is called
                                in all the Elements containing the
                                boundary faces, and thus impose the
                                values at nodes that are not in the
                                labeled faces.<br>
                                Is it a normal behavior ? I then have to
                                test the position of the node calling
                                uIn, in order to impose the good value.<br>
                                I have this problem for a Poiseuille
                                flow, where at 2 corner Elements i have
                                a zero velocity dirichlet condition
                                (wall) and a In flow velocity one.<br>
                              </blockquote>
                              <div><br>
                              </div>
                              <div>I believe I have fixed this in
                                knepley/fix-plex-bc-multiple which
                                should be merged soon. Do you know how
                                to merge that branch and try?</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"> The
                                pressure is then very high at the corner
                                nodes of those 2 Elements.<br>
                                Do you think my pressure problem comes
                                from there ? (The velocity field is
                                correct)<br>
                                <br>
                                Many thanks,<br>
                                <br>
                                Regards,<br>
                                <br>
                                Yann<br>
                                <br>
                                PS : i'm using those runtime options :<br>
                                -vel_petscspace_order 2
                                -pres_petscspace_order 1 \<br>
                                -ksp_type fgmres -pc_type fieldsplit
                                -pc_fieldsplit_type schur
                                -pc_fieldsplit_schur_fact_type full  \<br>
                                -fieldsplit_velocity_pc_type lu
                                -fieldsplit_pressure_ksp_rtol 1.0e-10
                                -fieldsplit_pressure_pc_type jacobi<br>
                                <br>
                                <br>
                                ---<br>
                                L'absence de virus dans ce courrier
                                électronique a été vérifiée par le
                                logiciel antivirus Avast.<br>
                                <a
                                  href="https://www.avast.com/antivirus"
                                  rel="noreferrer" target="_blank"
                                  moz-do-not-send="true">https://www.avast.com/antiviru<wbr>s</a><br>
                                <br>
                              </blockquote>
                            </div>
                            <br>
                            <br clear="all">
                            <div><br>
                            </div>
                            -- <br>
                            <div
                              class="m_2693683614766768657gmail_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/~<wbr>knepley/</a><br>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </blockquote>
                      <p><br>
                      </p>
                    </div>
                  </div>
                </div>
              </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>
      <p><br>
      </p>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>