Skip to content

Conversation

@connorjward
Copy link
Contributor

Summary of changes

  • Use (where possible) DMPlex.createBoxMesh to generate our periodic meshes. This is needed because the current approach that we use results in an invalid DMPlex that cannot subsequently be extruded. This PR is therefore a blocker for pyop3.
  • Uses a DMPlexTransform to perform "crossed", "left" or "right" refinement instead of rolling our own solution.
  • Deprecate PartiallyPeriodicRectangleMesh. It's functionality is totally covered by PeriodicRectangleMesh.
  • Set the 'Face Sets' label of the mesh (the boundary markers) by renumbering the existing one DMPlex provides, instead of performing our own comparison and traversal to rediscover already known structure.

Breaking API changes

  • The boundary IDs of periodic meshes has changed to something that I think is more intuitive. For a 2D partially periodic mesh previously the two boundaries would be labelled 1 and 2 regardless of whether they were the horizontal or vertical ones. The labels now have the same convention as the non-periodic case so if periodic in x the non-empty boundary markers are 3 and 4, and if periodic in y the non-empty boundary markers are 1 and 2.
  • For a 3D periodic box mesh we currently label all of the boundaries, meaning that the periodic boundary can be used in interior facet integrals. It substantially simplifies the implementation if we don't do this and only label the non-periodic boundaries. Is this an issue for anyone? Surely labelling the periodic boundary goes against the whole point of periodicity?

Prerequisite PRs

This is necessary because the previous approach to generating periodic
meshes resulted in a DMPlex with a slightly invalid state that prevents
subsequent transformations (in particular extrusion).

We also avoid manually labelling the boundaries in favour of just renumbering
the existing 'Face Sets' label produced by the DMPlex.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants