<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Matt!<div class=""><br class=""></div><div class="">I tested your branch and it works as expected, i.e. no empty label is created on my ExodusII mesh file.</div><div class=""><br class=""></div><div class="">I also left a comment on your MR on gitlab.</div><div class=""><br class=""></div><div class="">Unfortunately I was not able to get to this this week, so thanks a lot for working on this - much appreciated.</div><div class=""><br class=""></div><div class="">David<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 9, 2022, at 14:15, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi David,<div class=""><br class=""></div><div class="">Can you take a look at this and tell me whether it will work for you, or we should change it?</div><div class=""><br class=""></div><div class=""><a href="https://gitlab.com/petsc/petsc/-/merge_requests/5415" class="">https://gitlab.com/petsc/petsc/-/merge_requests/5415</a><br class=""></div><div class=""><br class=""></div><div class=""> Thanks,</div><div class=""><br class=""></div><div class=""> Matt</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 26, 2022 at 4:08 PM David Andrs <<a href="mailto:andrsd@gmail.com" class="">andrsd@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class=""><div class="">Hi Matt!</div><div class=""><br class=""></div>On Jun 26, 2022, at 10:39, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank" class="">knepley@gmail.com</a>> wrote:<br class=""><div class=""><blockquote type="cite" class=""><br class=""><div class=""><div dir="ltr" style="font-family:Helvetica;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;text-decoration:none" class=""><div dir="ltr" class="">On Sun, Jun 26, 2022 at 8:31 AM David Andrs <<a href="mailto:andrsd@gmail.com" target="_blank" class="">andrsd@gmail.com</a>> wrote:<br class=""></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">Hi Jed!<br class=""><br class="">I have been thinking about this and I think more correct would be not to create the label with an empty name. It is not all or nothing kind of a deal. Some side sets may have a name, some may not.<br class=""><br class="">What I sent is probably more convenient, since after loading the mesh there is either a label with a name or with an ID which can be easily grabbed and passed into `PetscDSAddBoundary`. However, I agree that assigning the name with an ID like this is specific to an application.<br class=""><br class="">I can send a patch that will prevent the creation of a label with an empty name if you think this is what should be happening instead.<br class=""></blockquote><div class=""><br class=""></div><div class="">I think what Jed is suggesting is to use "Face Sets" if the name is empty. I currently prefer this solution. </div></div></div></div></blockquote><div class=""><br class=""></div><div class="">I am not sure I follow. The “Face Sets” label gets created correctly in both cases as far as I can tell. </div><div class=""><br class=""></div><div class="">If there is an unnamed side set in the Exodus file, then a new label gets created with no name. This label then contains all the unnamed side sets. That does not seem correct to me and that’s what I was suggesting to fix in case y'all also think that is not right.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family:Helvetica;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;text-decoration:none" class=""><div class="gmail_quote"><div class="">Would this screw up your current workflow?</div></div></div></div></blockquote><div class=""><br class=""></div><div class="">No, it has no effect on my workflow. Jed’s question made me realize that I need to create the labels with IDs as their names every time. In ExodusII, IDs are mandatory, names are not. We do not know upfront if the user would use an ID or a name, so I need to have both if they are present in the mesh file. But, that is as I said, specific to my application.</div><div class=""><br class=""></div><div class="">—</div><div class="">David</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family:Helvetica;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;text-decoration:none" class=""><div class="gmail_quote"><div class=""><br class=""></div><div class="">I would also like to have a consistent policy for everything, but it is hard for me to see what this would be right now.</div></div></div></div></blockquote><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family:Helvetica;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;text-decoration:none" class=""><div class="gmail_quote"><div class=""><br class=""></div><div class=""> Thanks,</div><div class=""><br class=""></div><div class=""> Matt</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">—<br class="">David<br class=""><br class=""><br class="">> On Jun 25, 2022, at 22:54, Jed Brown <<a href="mailto:jed@jedbrown.org" target="_blank" class="">jed@jedbrown.org</a>> wrote:<br class="">><span class=""> </span><br class="">> Do you think this is more correct than just using "Face Sets", which gives you a numbered index?<br class="">><span class=""> </span><br class="">> There is curently some inconsistency between file formats in whether various sets show up as stand-alone labels or values under Face Sets. And there's this lingering issue to have a way to name Face Sets (and Cell Sets).<br class="">><span class=""> </span><br class="">><span class=""> </span><a href="https://gitlab.com/petsc/petsc/-/issues/689" rel="noreferrer" target="_blank" class="">https://gitlab.com/petsc/petsc/-/issues/689</a><br class="">><span class=""> </span><br class="">> The issue is that if we just make named labels, there's no good way to do structured traversal (handle all Face Sets) and one also has to be careful to avoid namespace collisions between application sets and sets created by the mesh.<br class="">><span class=""> </span><br class="">> David Andrs <<a href="mailto:andrsd@gmail.com" target="_blank" class="">andrsd@gmail.com</a>> writes:<br class="">><span class=""> </span><br class="">>> Hello!<br class="">>><span class=""> </span><br class="">>> The current behavior in DMPlexCreateExodus is assuming that side sets are always named. However, that is not always true. If there are unnamed side sets in an ExodusII file, the created DM will contain a label with an empty name (“”) with as many stratas as there are side sets. See the sample output from DMView below:<br class="">>><span class=""> </span><br class="">>> Labels:<br class="">>> celltype: 3 strata with value/size (0 (138900), 4 (125514), 1 (265620))<br class="">>> depth: 3 strata with value/size (0 (138900), 1 (265620), 2 (125514))<br class="">>> Cell Sets: 4 strata with value/size (1 (57888), 2 (57888), 4 (1824), 5 (7914))<br class="">>> Face Sets: 6 strata with value/size (1000 (28944), 1001 (28944), 1003 (28944), 1005 (15144), 1100 (120), 1200 (120))<br class="">>> : 6 strata with value/size (1000 (28944), 1001 (28944), 1003 (28944), 1005 (15144), 1100 (120), 1200 (120))<br class="">>><span class=""> </span><br class="">>> The attached patch fixes the behavior and names the side sets according to their IDs if there is no name associated with it in the ExodusII file. See the modified behavior below:<br class="">>><span class=""> </span><br class="">>> Labels:<br class="">>> celltype: 3 strata with value/size (0 (138900), 4 (125514), 1 (265620))<br class="">>> depth: 3 strata with value/size (0 (138900), 1 (265620), 2 (125514))<br class="">>> Cell Sets: 4 strata with value/size (1 (57888), 2 (57888), 4 (1824), 5 (7914))<br class="">>> Face Sets: 6 strata with value/size (1000 (28944), 1001 (28944), 1003 (28944), 1005 (15144), 1100 (120), 1200 (120))<br class="">>> 1000: 1 strata with value/size (1000 (28944))<br class="">>> 1001: 1 strata with value/size (1001 (28944))<br class="">>> 1003: 1 strata with value/size (1003 (28944))<br class="">>> 1005: 1 strata with value/size (1005 (15144))<br class="">>> 1100: 1 strata with value/size (1100 (120))<br class="">>> 1200: 1 strata with value/size (1200 (120))<br class="">>><span class=""> </span><br class="">>> The patch is against 3.17.0, but is seems it should apply cleanly on 3.17.2.<br class="">>><span class=""> </span><br class="">>> With regards,<br class="">>><span class=""> </span><br class="">>> David Andrs<br class=""><br class=""></blockquote></div><br clear="all" class=""><div class=""><br class=""></div>--<span class=""> </span><br class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener</div><div class=""><br class=""></div><div class=""><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" class="">https://www.cse.buffalo.edu/~knepley/</a></div></div></div></div></div></div></div></div></div></blockquote></div><br class=""></div></blockquote></div><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener</div><div class=""><br class=""></div><div class=""><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" class="">https://www.cse.buffalo.edu/~knepley/</a><br class=""></div></div></div></div></div></div></div>
</div></blockquote></div><br class=""></div></body></html>