Convert 2D msh file to xdmf with physical groups

Hi,

I’ve been struggling to replicate tutorial 5 with subdomains using gmsh. There seems to be a lot of incompatibilities between meshio versions, and couldn’t find a working solution for FEniCS 2019.1. How would you import this mesh to FEniCS?

Thanks!

See for instance; Need help converting GMSH to FEniCS - #17 by dokken

I’m not sure if I understand the procedure, but it works. From this point, is it possible to assign material values to cf and boundary conditions to mf? Thanks

For material parameters (cf) see: How to define different materials / importet 3D geometry (gmsh) - #2 by dokken
For boundary conditions, see;
Subdomains and boundary conditions