Problem with multiple physicals for one elementary region -- .msh format logic
When several physical entities are defined on the same elementary entity, the .msh format saves several elements (with different tags)--one for each physical region.
This is not bad in itself, but when gmsh reads the .msh file again, it stores the duplicate elements in the (single, uniaue) elementary region, and subsequent queries as to which element belongs to which physical group cannot be answered! Indeed, the physical information is stored in the elementary region (not in the element).
The cleanest solution would be to NEVER generate duplicate elements. The .msh format should si,ply have a $PhysicalGroups field that stores the Physical-to-Elemnetary/ies relationship.