Dear Christophe,
Very interesting issue! The example you use, maxwell-mg-3d-PETSc-complex.edp
, deals with nested meshes. Meaning that the meshes are build by uniformly refining the one from the previous level. In that case, you don’t need to transfer anything, the interpolation is purely local on each process. You can simply write
def(u2) = def(u);
If you want to transfer variables between non-nested meshes, you can for example have a look at this other post.