<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Thank you, this MR works if I generate the mesh within the code.<div><br></div><div>But using a mesh made in gmsh, I see the same issue.</div><div><br></div><div>Thanks</div><div>praveen</div><div><br><blockquote type="cite"><div>On 14-Dec-2022, at 12:51 AM, Matthew Knepley <knepley@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: HelveticaNeue; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><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-width: 1px; border-left-style: solid; border-left-color: 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-width: 1px; border-left-style: solid; border-left-color: 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><div 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></div><div 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></div><div 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></div><div 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></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Menlo;"><br></div><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> <span class="Apple-converted-space"> </span>Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div dir="ltr"><div class="gmail_quote"><div> <span class="Apple-converted-space"> </span>Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div><div>Thanks</div><div>praveen</div></div></blockquote></div>--<span class="Apple-converted-space"> </span><br><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div></div></div></div></div></blockquote></div></div></div></blockquote></div><br></body></html>