# Transitioning from mesh.xml to mesh.xdmf, from dolfin-convert to meshio

**URL:** <https://fenicsproject.discourse.group/t/transitioning-from-mesh-xml-to-mesh-xdmf-from-dolfin-convert-to-meshio/412>\
**Category:** mesh\
**Created:** [March 22, 2019, 9:01am UTC](https://fenicsproject.discourse.group/t/transitioning-from-mesh-xml-to-mesh-xdmf-from-dolfin-convert-to-meshio/412 "2019-03-22T09:01:33Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![raboynics](https://avatars.discourse-cdn.com/v4/letter/r/4bbf92/32.png) [@raboynics](https://fenicsproject.discourse.group/u/raboynics)\
**Post date:** [March 25, 2019, 9:22am UTC](https://fenicsproject.discourse.group/t/transitioning-from-mesh-xml-to-mesh-xdmf-from-dolfin-convert-to-meshio/412/8 "2019-03-25T09:22:37Z")

</div>

If I understand well, what I call `subdomains` corresponds to your `mvc`, while what I call `boundary_parts` corresponds to your `cf`.  
But when I use your code and then `subdomains = mvc` and `boundary_parts = cf`, I get nonsensical results.  
For example a non-zero surface area `assemble(1 * ds(12, domain=mesh))` returns 0 now, instead of the correct area. I suspect it’s because in my original code I have `mesh = Mesh("file.xml")` while in my new code I have `mesh = Mesh()`. I do not know which argument I can put inside the function Mesh(). I tried the XDMF file, but this returns an error. So I still don’t know how to make the full transition to XDMF.

Furthermore I am only able to reach that far on an Ubuntu machine, where dolfin has been compiled with hdf5 support. On Arch Linux (at home), I get an error message when I use your snippet codes as described in an earlier question [here](https://fenicsproject.discourse.group/t/create-mesh-with-gmsh-convert-it-and-import-it-in-dolfin-problems/107/3), and on the [fenics support mailing list](https://groups.google.com/forum/#!topic/fenics-support/-ApSpB4-UuY). I do not know how to compile dolfin with hdf5 support, it doesn’t do it by default even when the hdf5 package(s) are installed.

---

_[View the full topic](https://fenicsproject.discourse.group/t/transitioning-from-mesh-xml-to-mesh-xdmf-from-dolfin-convert-to-meshio/412)._
