[petsc-dev] Problem with unnamed side sets in DMPlexCreateExodus

Jed Brown jed at jedbrown.org
Fri Jul 1 22:49:19 CDT 2022


David Andrs <andrsd at gmail.com> writes:

> Hi Matt!
>
> On Jun 26, 2022, at 10:39, Matthew Knepley <knepley at gmail.com> wrote:
>> 
>> On Sun, Jun 26, 2022 at 8:31 AM David Andrs <andrsd at gmail.com <mailto:andrsd at gmail.com>> wrote:
>> Hi Jed!
>> 
>> 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.
>> 
>> 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.
>> 
>> 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.
>> 
>> I think what Jed is suggesting is to use "Face Sets" if the name is empty. I currently prefer this solution.
>
> I am not sure I follow. The “Face Sets” label gets created correctly in both cases as far as I can tell. 
>
> 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.

IIRC, the suggestion is to skip creating extra named labels when the Exodus side sets don't have names. So you'd just use "Face Sets" as it's currently defined (regardless of whether the side sets are named in the file). Note that the linked issue proposes to create a table so you can do two-way translation between names and integers.

We'd be happy to get a merge request to skip creating the named labels for side sets that aren't named in Exodus.


More information about the petsc-dev mailing list