Gmshio not available in v10

Hello,

I am trying to import gmhsio in v10 using

import dolfinx.io.gmshio

or

from dolfinx.io import gmshio

and it returns

cannot import name 'gmshio' from 'dolfinx.io' 
No module named 'dolfinx.io.gmshio'

Is it still possible to use gmshio in v10? And if so, how?

Many thanks!

Claire

The module has been renamed to dolfinx.io.gmsh,
If you want to minimize code changes, I would call import dolfinx.io.gmsh as gmshio :slight_smile:

1 Like

Thanks! I have a follow-up question, it seems that my previous syntax

msh, cell_tags, facet_tags = gmshio.model_to_mesh(gmsh.model, mesh_comm, model_rank, gdim=tdim)

yields an error now, ‘too many values to unpack”… how can I handle the output of the new version of gmshio.model_to_mesh()?

This is described in:

Specifically:

You can retrieve data from the named tuple with

output = gmshio.model-to_mesh(...)
mesh = output.mesh
cell_tags = output.cell_tags
facet_tags = output.facet_tags
1 Like