# Dolfin-convert for convert msh to xml file

**URL:** <https://fenicsproject.discourse.group/t/dolfin-convert-for-convert-msh-to-xml-file/3102>\
**Category:** mesh\
**Created:** [May 3, 2020, 12:16am UTC](https://fenicsproject.discourse.group/t/dolfin-convert-for-convert-msh-to-xml-file/3102 "2020-05-03T00:16:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NKguirre](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/nkguirre/32/1130_2.png) [@NKguirre](https://fenicsproject.discourse.group/u/NKguirre)\
**Post date:** [May 3, 2020, 12:16am UTC](https://fenicsproject.discourse.group/t/dolfin-convert-for-convert-msh-to-xml-file/3102/1 "2020-05-03T00:16:10Z")

</div>

I convert my msh file to xml using the dolfin-convert instruction. I have a doubt, Why this instruction create two files, one of them called name\_physical\_region.xml and the other name.xml?, whats is the reason to create the name\_physical\_region.xml file?.

Thanks

---

<div class="post-metadata">

**Author:** ![Leo](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@Leo](https://fenicsproject.discourse.group/u/Leo)\
**Post date:** [May 3, 2020, 12:47am UTC](https://fenicsproject.discourse.group/t/dolfin-convert-for-convert-msh-to-xml-file/3102/2 "2020-05-03T00:47:38Z")

</div>

If you have marked some of your subdomains and boundaries (For example in GMSH), after converting your mesh with dolfin-convert, 3 files will be created including:

- Mesh (mesh.xml)
- Marked Subdomains (mesh\_physical\_region.xml)
- Marked Boundaries (mesh\_facet\_region.xml)

You can refer to your mesh data as following:

```
mesh = Mesh("mesh.xml")
facets = MeshFunction("size_t", mesh, "mesh_facet_region.xml")
domains = MeshFunction("size_t", mesh, "mesh_physical_region.xml")
```
