Load mesh and facet tags in dolfinx from .msh or .xdmf file

Dear all,

I have a .msh file and a .xdmf file containitng the mesh and facet tags that I am using to solve a problem.
Because I don’t want to perform the meshing process every time I run the code, I was wondering what would be the most efficient way of loading the mesh in dolfinx (including facet tags) from the .msh or .xdmf file.

Any suggestion?

Thank you all in advance.

The most efficient way is using XDMF, as it reads in data over multiple processes (if you use multiple processes with mpirun). Using msh, an ascii based format, you would need to read the data in on a single process, and then distribute it (this is what dolfinx.mesh.create_mesh does).