.xdmf mixed type - problem with generating mesh

i have a problem with importing mesh generated in gmsh. The .msh file is being read and transformed to .xdmf by meshio 5.3.4. Although my mesh contains only triangular elements when it is being generated based on more than one physical group (surface) the generated .xdmf file is type “mixed”.
Files created based on the mesh generated on just one physical group work just fine

There are plenty of other posts on the forum regarding this, see:


And indeed it worked. I have previously seen those answers but i thought that after said process the information about the physical groups would be lost and not passed to the new xdmf file, but apparently it does work as i intended.

ok, the physical group information is stored in the dict mesh.cell_data_dict[“gmsh:physical”] of the cell objects