In this release of scifem, we introduce topologically periodic meshes.
For the last 5 years, the only way (as far as I am aware) of making a mesh periodic has been through the DOLFINx_MPC library.
However, this approach has been limited to continuous Lagrange elements.
I’ve been working on fine-tuning an alternative solution for the last two years.
With our new approach, the periodic boundary becomes an interior facet of the grid, supporting dS integrals, and therefore DG and more exotic elements such as Raviart-Thomas and Nedelec elements.
The library supports creating these relations in multiple ways:
- Topological: Given a mesh, provide the global input node indices of the pairs that match.
- Geometrical: Given a mesh, create an indicator function that marks which nodes to remove, and a mapping function that maps them to their replacements.
In the online documentation you will find examples of both:
- Geometrical: Poisson on a periodic mesh — scifem using
scifem.periodic.create_periodic_mesh - Topological: Periodicity from a gmsh model — scifem through gmsh using
scifem.periodic.read_periodic_mesh_from_msh
These features are supported for both the DOLFINx v0.11.0 release and main branch. The code is available on github: GitHub - scientificcomputing/scifem: Scientific finite element toolbox · GitHub, downloadable from pypi: scifem · PyPI and soon conda-forge.