Interpolate functions defined on different meshes

Hi everybody, I am trying to compare two functions (say u1 and u2) defined on different meshes (say mesh1 and mesh2) where mesh1 is the unit square 10x10 and mesh2 is the unit square 5x5. Is there any way to do that? I tried to use u1.interpolate(u2) and viceversa but nothing worked. The DOLFINx version I’m using is 0.7.3. Thanks in advance.

See for instance dolfinx/python/test/unit/fem/ at v0.7.3 · FEniCS/dolfinx · GitHub

The function I serached for was the same written for interpolating functions on overlapping mashes with some adjustments. (I write that for future users). Thank you so much :slight_smile: