Do you think this is more correct than just using "Face Sets", which gives you 
a numbered index?

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).

https://gitlab.com/petsc/petsc/-/issues/689

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.

David Andrs <and...@gmail.com> writes:

> Hello!
>
> 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:
>
> Labels:
>   celltype: 3 strata with value/size (0 (138900), 4 (125514), 1 (265620))
>   depth: 3 strata with value/size (0 (138900), 1 (265620), 2 (125514))
>   Cell Sets: 4 strata with value/size (1 (57888), 2 (57888), 4 (1824), 5 
> (7914))
>   Face Sets: 6 strata with value/size (1000 (28944), 1001 (28944), 1003 
> (28944), 1005 (15144), 1100 (120), 1200 (120))
>   : 6 strata with value/size (1000 (28944), 1001 (28944), 1003 (28944), 1005 
> (15144), 1100 (120), 1200 (120))
>
> 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:
>
> Labels:
>   celltype: 3 strata with value/size (0 (138900), 4 (125514), 1 (265620))
>   depth: 3 strata with value/size (0 (138900), 1 (265620), 2 (125514))
>   Cell Sets: 4 strata with value/size (1 (57888), 2 (57888), 4 (1824), 5 
> (7914))
>   Face Sets: 6 strata with value/size (1000 (28944), 1001 (28944), 1003 
> (28944), 1005 (15144), 1100 (120), 1200 (120))
>   1000: 1 strata with value/size (1000 (28944))
>   1001: 1 strata with value/size (1001 (28944))
>   1003: 1 strata with value/size (1003 (28944))
>   1005: 1 strata with value/size (1005 (15144))
>   1100: 1 strata with value/size (1100 (120))
>   1200: 1 strata with value/size (1200 (120))
>
> The patch is against 3.17.0, but is seems it should apply cleanly on 3.17.2.
>
> With regards,
>
> David Andrs

Reply via email to