I would suggest using xdmf
format instead of the legacy xml
format. There is a long thread on how to use meshio
to write xdmf
meshes to be then read in dolfin
, see here.
As for loading xdmf
meshes
from dolfin import *
mesh = Mesh()
XDMFFile("<name>.xdmf").read(mesh)
should work. There are plenty of examples by Dokken in the thread above.