Support periodic meshes via mesh topology/geometry
Periodic boundary conditions are currently handled via the dofmap construction. This has some drawbacks:
- The dofmap code is complicated
- Facet integrals on periodic boundaries are not supported
- Mesh partitioning does not account for periodicity (probably not a big deal)
It would be simpler to support periodic meshes in which the topology naturally accounts for the periodicity.
- [ ] Work out a format to save/load periodic meshes from File (XDMF) whilst maintaining visualisation integrity
Thanks to @haplav for linking us to this. We're having a similar discussion over at PETSc. Xdmf does not support periodic, but we're interested in extending it (and specifying an HDF5 format from which the XML can automatically be created). As a modest extension, I would propose a dataset of shape (n, 2) containing (image_node, true_node). Perhaps @knepley would prefer (image_element, face_num, true_elem, face_num, rotation), but I think that's quite a bit more complexity/specification for an existing Xdmf user.
I'd be curious to hear more details about "topology naturally accounts", because it's necessary to be able to apply some transformations when mapping true -> image point (such as rotation in the linked example).