<div dir="ltr"><div dir="ltr">On Tue, Dec 13, 2022 at 10:57 AM Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@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"><div dir="ltr">On Tue, Dec 13, 2022 at 6:11 AM Praveen C <<a href="mailto:praveen@gmx.net" target="_blank">praveen@gmx.net</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>Hello<div><br></div><div>In the attached test, I read a small grid made in gmsh with periodic bc.</div><div><br></div><div>This is a 2d mesh.</div><div><br></div><div>The cell numbers are shown in the figure.</div><div><br></div><div>All faces have length = 2.5</div><div><br></div><div>But using <span style="font-family:Menlo;font-size:15px">PetscFVFaceGeom </span>I am getting length of 7.5 for some faces. E.g.,</div><div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:15px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">face: 59, centroid = 3.750000, 2.500000, normal = 0.000000, -7.500000</span></p>
<p style="margin:0px;font-stretch:normal;font-size:15px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#ff2600">===> Face length incorrect = 7.500000, should be 2.5</font></span></p>
<p style="margin:0px;font-stretch:normal;font-size:15px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">support[0] = 11, cent = 8.750000, 3.750000, area = 6.250000</span></p>
<p style="margin:0px;font-stretch:normal;font-size:15px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">support[1] = 15, cent = 8.750000, 1.250000, area = 6.250000</span></p><p style="margin:0px;font-stretch:normal;font-size:15px;line-height:normal;font-family:Menlo"><br></p><div>There are also errors in the orientation of normal.</div></div><div><br></div><div>If we disable periodicity in geo file, this error goes away.</div></div></blockquote><div><br></div><div>Yes, by default we only localize coordinates for cells. I can put in code to localize faces.</div></div></div></blockquote><div><br></div><div>Okay, I now have a MR for this: <a href="https://gitlab.com/petsc/petsc/-/merge_requests/5917">https://gitlab.com/petsc/petsc/-/merge_requests/5917</a></div><div><br></div><div>I am attaching your code, slightly modified. You can run</div><div><br></div><div> ./dmplex -malloc_debug 0 -dm_plex_box_upper 10,10 -dm_plex_box_faces 4,4 -dm_plex_simplex 0 -dm_view ::ascii_info_detail -draw_pause 3 -dm_plex_box_bd periodic,periodic -dm_localize_height 0</div><div><br></div><div>which shows incorrect edges and</div><div><br></div><div>./dmplex -malloc_debug 0 -dm_plex_box_upper 10,10 -dm_plex_box_faces 4,4 -dm_plex_simplex 0 -dm_view ::ascii_info_detail -draw_pause 3 -dm_plex_box_bd periodic,periodic -dm_localize_height 1<br></div><div><br></div><div>which is correct. If you want to control things yourself, instead of using the option you can call DMPlexSetMaxProjectionHeight() on the coordinate DM yourself.</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 class="gmail_quote"><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>Thanks</div><div>praveen</div></div></blockquote></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">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></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">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>