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

David Andrs andrsd at gmail.com
Thu Jun 23 10:38:10 CDT 2022


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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20220623/28633e90/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: set-side-set-ids-for-unnamed.patch
Type: application/octet-stream
Size: 790 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20220623/28633e90/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20220623/28633e90/attachment-0003.html>


More information about the petsc-dev mailing list