dolfinx
dolfinx copied to clipboard
EM demos wrong because Gmsh-created meshes are by default not ghosted
The EM demos (demo_axis.py, demo_pml.py, maybe more) compute wrong diagnostic quantities because some quantities involve interior facet integrals. Proper computation of interior facet integrals requires meshes to be ghosted by facet. But, gmshio.model_to_mesh by default does not use any ghosting.
We should really be able to tell whether or not the mesh has the required ghosting.
@jorgensd thoughts?
@jorgensd thoughts?
I guess we should be able to add a check when generating the form that we have the appropriate ghosting (at least for dS integrals).
At least a quick fix for the demos is to set the Ghost mode in the partitioner input to read_from_msh and model_to_mesh https://github.com/FEniCS/dolfinx/blob/main/python/dolfinx/io/gmshio.py#L170 for the two demos