MeshView submesh vertex map to parent mesh

Hello,

The mapping between parent and child mesh vertices (and cells) is built when building the MeshView object. You can access these from the topology of your submesh :

submesh.topology().mapping()[mesh.id()].vertex_map()
submesh.topology().mapping()[mesh.id()].cell_map()

Note : In your code you redefine the variable marker after having marked your entities, making it zero for all entities so I suspect your submesh to be empty.

2 Likes