I’m trying to map a dolfinx.la.vector defined from the index_map corresponding to the facets (codim = 1) of a mesh to another dolfinx.la.vector defined from a similar index_map but coming from the sub_topology of the entities map returned by dolfinx.mesh.create_submesh. However, the map I get (subt2t in the MWE below) is off since its length does not match the number of local facets in the submesh.
Maybe I just do not understand properly how to use sub_topology_to_topology…
It might be clearer with the following MWE. In this example the last values in subt2t are off and therefore the mapping between submesh_vec and mesh_vec does not work.
I think I know what is the problem with my MWE: e_map.sub_topology_to_topology provides a map between entities of dim e_map.topology.dim, which is 2 in this case, while I want a map between facets of dim 1…
Do you know if there is a way to get a sub_topology_to_topology for entities of dim 1?
So what you are trying to do is essentially map some data from the facets of the parent mesh to the facets of the submesh.
This is for instance done with scifem.transfer_meshtags_to_submesh