# How to deal with output files of meshio in FEniCS

**URL:** <https://fenicsproject.discourse.group/t/how-to-deal-with-output-files-of-meshio-in-fenics/2773>\
**Category:** Uncategorized\
**Created:** [March 31, 2020, 11:20pm UTC](https://fenicsproject.discourse.group/t/how-to-deal-with-output-files-of-meshio-in-fenics/2773 "2020-03-31T23:20:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabriel\_clemente](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@gabriel\_clemente](https://fenicsproject.discourse.group/u/gabriel_clemente)\
**Post date:** [March 31, 2020, 11:20pm UTC](https://fenicsproject.discourse.group/t/how-to-deal-with-output-files-of-meshio-in-fenics/2773/1 "2020-03-31T23:20:17Z")

</div>

Guys, I know how to deal with output files in dolfin conversion, but how can I addapt file\_gmsh:physical.xml and file.xml in my FEniCS code? Can someone give me some examples?

---

<div class="post-metadata">

**Author:** ![bhaveshshrimali](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/bhaveshshrimali/32/124_2.png) [@bhaveshshrimali](https://fenicsproject.discourse.group/u/bhaveshshrimali)\
**Post date:** [April 1, 2020, 12:10am UTC](https://fenicsproject.discourse.group/t/how-to-deal-with-output-files-of-meshio-in-fenics/2773/2 "2020-04-01T00:10:29Z")

</div>

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](https://fenicsproject.discourse.group/t/transitioning-from-mesh-xml-to-mesh-xdmf-from-dolfin-convert-to-meshio/412/79).  
As for loading `xdmf` meshes

```auto
from dolfin import *
mesh = Mesh()
XDMFFile("<name>.xdmf").read(mesh)

```

should work. There are plenty of examples by Dokken in the thread above.

---

<div class="post-metadata">

**Author:** ![gabriel\_clemente](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@gabriel\_clemente](https://fenicsproject.discourse.group/u/gabriel_clemente)\
**Post date:** [May 27, 2020, 3:48am UTC](https://fenicsproject.discourse.group/t/how-to-deal-with-output-files-of-meshio-in-fenics/2773/3 "2020-05-27T03:48:46Z")

</div>

Thank you for the tips. Sorry for the late answer.
