<div dir="ltr"><div dir="ltr">On Mon, Sep 25, 2023 at 8:58 AM Azeddine Messikh via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</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><div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px"><div dir="ltr">Dear developers</div><div dir="ltr"><br></div><div dir="ltr">I tried to run ex24.c <a href="https://petsc.org/release/src/snes/tutorials/ex24.c.html" rel="nofollow" target="_blank">https://petsc.org/release/src/snes/tutorials/ex24.c.html</a> using the following command line</div><div dir="ltr"><span><br></span></div><div dir="ltr"><span>./ex24 -sol_type quadratic -dm_plex_simplex 0  -field_petscspace_degree 1 -potential_petscspace_degree 1 -dm_plex_box_faces 2,1</span></div><div dir="ltr"><span><br></span></div><div dir="ltr"><span>I discovered that at<br></span></div><div dir="ltr"><span><span><pre width="80">254:     <a href="https://petsc.org/release/manualpages/Sys/PetscCall/" rel="nofollow" target="_blank">PetscCall</a>(PetscWeakFormSetIndexBdResidual(wf, label, 1, 0, 0, 0, f0_bd_quadratic_q, 0, NULL));</pre></span></span><div> reverses the value of the integrals at the top only. That is</div></div><div dir="ltr">The boundary integral corresponding to node 5 becomes that of 4 and vise-versa. <br></div><div dir="ltr">Same thing for nodes 5 and 6.</div></div></div></blockquote><div><br></div><div>I apologize for taking so long to reply. This email fell out of my Inbox.</div><div><br></div><div>I believe the problem is understanding the ordering of unknowns in Plex. For all shapes, I orient the boundary to have outward normals. This means that for quads, the vertex ordering would be</div><div><br></div><div>  1--2--5--4    and    2--3--6--5</div><div><br></div><div>Does this make sense?</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><div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px"><div dir="ltr">The mesh index is as follows<br></div><div dir="ltr">*4---*5---*6<br></div><div dir="ltr"> |       |      |<br></div><div dir="ltr"> |       |      |</div><div dir="ltr">*1--- *2---*3</div><div dir="ltr"><br></div><div dir="ltr">However,  if I use  <span><span>-dm_plex_simplex 1 there is no problem.</span></span></div><div dir="ltr"><span><span><br></span></span></div><div dir="ltr"><span><span>The model is in the form Au = b</span></span></div><div dir="ltr"><span><span><br></span></span></div><div dir="ltr"><span><span>the value of b with  <span> <span><span>"-dm_plex_simplex 0" is</span></span></span></span></span></div><div dir="ltr"><span><span><span><span><div>[0.25<br>0.0104167<br>0.<br>0.<br>0.145833<br>0.<br>-0.583333<br>0.177083<br>0.<br>0.0833333<br>-0.28125<br>0.<br>0.<br>-0.6875<br>0.<br>-0.75<br>-0.364583<br><div>0.]</div><div><br></div><div dir="ltr">and for <span><span><span><span><span><span>-dm_plex_simplex 1</span></span></span></span></span></span><br></div><div dir="ltr"><div>[0.0833333<br>0.0104167<br>0.<br>0.<br>0.145833<br>0.<br>-0.583333<br>0.177083<br>0.<br>0.25<br>-0.260417<br>0.<br>1.43404e-16<br>-0.645833<br>0.<br>-0.75<br>-0.427083<br>0.]<br><br></div><div dir="ltr">you can see that the value at node 1 =0.25  and node 4 = <span><span><span><span><span>0.0833333 ( simplex 0)<br></span></span></span></span></span></div><div dir="ltr"><span><span><span><span><span>which is reversed, that is,      <span><span><span><span><span>node 4 =0.25  and node 1 = <span><span><span><span><span>0.0833333</span></span></span></span></span></span></span></span></span></span> (simplex 1)<br></span></span></span></span></span></div></div><div dir="ltr"><br></div><div dir="ltr">So, my own calculation shows that at node 1 should be 0.083333 not 0.25.</div><div dir="ltr">The -dm_plex_simplex 1 gives the correct answer but <span><span><span><span><span>-dm_plex_simplex 0 gives wrong answer.</span></span></span></span></span></div><div dir="ltr"><span><span><span><span><span><br></span></span></span></span></span></div><div dir="ltr"><span><span><span><span><span><br></span></span></span></span></span></div><div dir="ltr"><span><span><span><span><span>Would you please help me in this matter. </span></span></span></span></span></div><div dir="ltr"><span><span><span><span><span>Sincerely yours</span></span></span></span></span></div><div dir="ltr"><span><span><span><span><span>Azeddine M</span></span></span></span></span></div><div dir="ltr"><span><span><span><span><span> </span></span></span></span></span><br></div><div dir="ltr"> <br></div></div></span></span></span></span><div><br></div><span><span><span><span></span></span></span></span></div><div dir="ltr"><span><span><br></span></span></div><div dir="ltr"><span><span><br></span></span></div><div dir="ltr"><span><span><br></span></span></div><div dir="ltr"><span><span><br></span></span></div></div></div></blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><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>