Problem distributing netgen mesh with Identifications in a mpi cluster

Dear all,

distributing a mesh with only one identification works well.

box = Box((0,0,0),(1,1,1))
box.faces.Max(X).Identify(box.faces.Min(X), “leftright”)
geom = Glue([box])
ngmesh = OCCGeometry(geom).GenerateMesh(maxh=0.15)
mesh = Mesh(ngmesh)

But if I have a geometry with multiple identifications the distribution crashes.

box2 = Box((0,0,0),(1,1,1))
box3 = Box((0,1,0),(1,1.5,1))
box2.faces.Max(X).Identify(box2.faces.Min(X), “leftright2”)
box3.faces.Max(X).Identify(box3.faces.Min(X), “leftright3”)
geom = Glue([box2,box3])
ngmesh2 = OCCGeometry(geom).GenerateMesh(maxh=0.15)
mesh2 = Mesh(ngmesh2)

Question: Is my identification wrong or is something missing in the ngmesh serialisation?

I would be very grateful for any hints!

Best regards, Simon.

Test.ipynb (19.1 KB)

Thanks to Christopher!, the problem is solved:

  • fix in netgen pushed.
  • If geometry isn’t needed, use mesh.SetGeometry(None)

Regards, Simon.