Skip to content

No cross-partition diffusion when importing a pre-partitioned Gmsh .msh file as a Gmsh2D/3D object #1189

@guyer

Description

@guyer

Discussed in #1188

Originally posted by johnhavenar March 6, 2026
Hello all,

I've run into an issue when:

  1. Building a mesh with the Gmsh Python API
  2. Partition it with gmsh.model.mesh.partition(nparts)
  3. Write a .msh file (version 2.2 format)
  4. 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.

image

Pulling from a .geo file works correctly: mesh = Gmsh2D("mesh.geo", communicator=parallelComm)

image

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. :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions