# Build a torus with gmsh - Error when loading mesh into DOLFINx

**URL:** <https://fenicsproject.discourse.group/t/build-a-torus-with-gmsh-error-when-loading-mesh-into-dolfinx/8811>\
**Category:** mesh\
**Created:** [July 19, 2022, 6:38pm UTC](https://fenicsproject.discourse.group/t/build-a-torus-with-gmsh-error-when-loading-mesh-into-dolfinx/8811 "2022-07-19T18:38:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [July 19, 2022, 8:59pm UTC](https://fenicsproject.discourse.group/t/build-a-torus-with-gmsh-error-when-loading-mesh-into-dolfinx/8811/2 "2022-07-19T20:59:33Z")

</div>

You need to add physical groups to your mesh, as the function `read_from_msh` [states](https://github.com/FEniCS/dolfinx/blob/4d90344fe535aba3c812aafa1b720fca03932209/python/dolfinx/io/gmshio.py#L271)

> Reads a mesh from a msh-file and returns the distributed DOLFINx  
> mesh and cell and facet markers associated with physical groups  
> in the msh file.

---

_[View the full topic](https://fenicsproject.discourse.group/t/build-a-torus-with-gmsh-error-when-loading-mesh-into-dolfinx/8811)._
