Subdomain definition based on input file

You need to add the subdomains to the mesh (with the cell_data kwarg in meshio) to keep the data (assuming that meshio can read in the subdomain markers. You should be able to follow a strategy similar to: Converting simple 2D mesh from gmsh to dolfin - #4 by dokken
Note that I would strongly advice you to use xdmf and not xml formatting when converting your mesh.

1 Like