Discussed in #1188
Originally posted by johnhavenar March 6, 2026
Hello all,
I've run into an issue when:
- Building a mesh with the Gmsh Python API
- Partition it with
gmsh.model.mesh.partition(nparts)
- Write a
.msh file (version 2.2 format)
- Read the mesh with
Gmsh2D(..., communicator=parallelComm)
However, the same diffusion problem works correctly when I let FiPy/Gmsh handle partitioning from a .geo file.
Here is the minimal failing pattern.
# rank 0
build mesh with gmsh Python API
gmsh.model.mesh.partition(NPROCS)
gmsh.write("mesh.msh")
# all ranks
mesh = Gmsh2D("mesh.msh", communicator=parallelComm, overlap=1)
T = CellVariable(mesh=mesh, value=0.0)
T.constrain(1.0, mesh.facesLeft)
T.constrain(0.0, mesh.facesRight)
DiffusionTerm().solve(var=T)
The solve appears to treat partition interfaces like uncoupled boundaries: there is no diffusion across the partition seam.
Pulling from a .geo file works correctly: mesh = Gmsh2D("mesh.geo", communicator=parallelComm)
Is FiPy expected to support pre-partitioned Gmsh .msh files written externally like this, including correct ghost/interface coupling for diffusion, or is the supported parallel path only to let FiPy invoke Gmsh itself from .geo / script input? From reading the documentation (particularly fipy.meshes.gmshMesh.MSHFile and fipy.meshes.gmshMesh.Gmsh3D), it seems like it should work fine.
I would be incredibly grateful for any help. :)
Discussed in #1188
Originally posted by johnhavenar March 6, 2026
Hello all,
I've run into an issue when:
gmsh.model.mesh.partition(nparts).mshfile (version 2.2 format)Gmsh2D(..., communicator=parallelComm)However, the same diffusion problem works correctly when I let FiPy/Gmsh handle partitioning from a
.geofile.Here is the minimal failing pattern.
The solve appears to treat partition interfaces like uncoupled boundaries: there is no diffusion across the partition seam.
Pulling from a .geo file works correctly:
mesh = Gmsh2D("mesh.geo", communicator=parallelComm)Is FiPy expected to support pre-partitioned Gmsh .msh files written externally like this, including correct ghost/interface coupling for diffusion, or is the supported parallel path only to let FiPy invoke Gmsh itself from .geo / script input? From reading the documentation (particularly
fipy.meshes.gmshMesh.MSHFileandfipy.meshes.gmshMesh.Gmsh3D), it seems like it should work fine.I would be incredibly grateful for any help. :)