bempp/bempp-cl

export using newest meshio

Closed this issue · 2 comments

In the newest version of meshio, gmsh2-binary and gmsh2-ascii are no longer the correct options

if extension == ".msh":
# Ensure that we use Gmsh2 for output
# to preserve domain indices.
# meshio does not yet support domain
# indices for gmsh4.
gmsh = True
if write_binary:
file_format = "gmsh2-binary"
else:
file_format = "gmsh2-ascii"
else:
gmsh = False

For now, I've set meshio==4.0.1 in environment.yml to avoid this issue

I don't know whether this issue is related to what I'm encountering if using gmsh version 4.
I would make a PR with the following change at:

cmd = gmsh_command + " -2 " + geo_name

- cmd = gmsh_command + " -2 " + geo_name'
+ cmd = gmsh_command + " -2 -format msh22 " + geo_name'

But I'm not sure which version of gmsh you are aiming to support as in environment.yml you are using 4, but in the Singularity recipe the one that comes with ubunut/bionic (3.0.6), and it doesn't include the msh22 format, but maybe the msh2 is enough and covers both cases. 🤷

This is now fixed in the staging branch