How to interpolate solution obtained from 1D mesh to Vector function space on 2D mesh

u_init is the solution along the y-axis. I want to interpolate this function on the following vector function space.

I want to interpolate the u_init on the first component of the u_n which is u_n[0]. What should I do ? Thanks.
I am getting the following error message:

tuple index out of range

Fenics

I have installed fenics using conda-forge.

EDITED AGAIN BY FB

Please see Read before posting: How do I get my question answered?

I edited your post because the code as you posted was unreadable by other users. Please edit again your first post using “```” when posting the code. If for some reason you can’t edit your own post, simply reply with the code properly formatted.

Thanks, Hopefully I have edited it in the required format.

Sorry, you haven’t. Please read what I wrote carefully, and try again.

Please note that interpolation between non-matching meshes is not fully supported in legacy dolfin.

If you want the 1D mesh to align with the «2D boundary, I would advice you to use SubMesh or MeshView.

I would strongly advice to move to dolfinx, where we have significantly improved sub meshes and parallel interpolation between matching or non matching meshes.