# Interpolation matrix between two meshes

**URL:** https://community.freefem.org/t/interpolation-matrix-between-two-meshes/735
**Category:** General Discussion
**Created:** [January 8, 2021, 9:04am UTC](https://community.freefem.org/t/interpolation-matrix-between-two-meshes/735 "2021-01-08T09:04:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![yongxing](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/yongxing/32/3632_2.png) [@yongxing](https://community.freefem.org/u/yongxing)
#### Post date: [January 8, 2021, 9:04am UTC](https://community.freefem.org/t/interpolation-matrix-between-two-meshes/735/1 "2021-01-08T09:04:32Z")

</div>

Hi,

Can some explain the following piece of code (two questions below), which is from [Distributed Lagrange Multiplier for Fluid-Structure Interactions | SpringerLink](https://link.springer.com/chapter/10.1007/978-3-319-94676-4_5)

fespace Vh(Thf, P1b); // velocity space  
fespace Qh(Thf, P1); // pressure space  
fespace Wh(Ths, P1b); // Lagrangian coordinates X,Y space  
fespace Lh(Ths, P1); // Lagrangian multiplier space  
fespace Zh(Thf, [P1b,P1b,P1]); // fluid space  
fespace Rh(Ths, [P1,P1,P1b,P1b]);// solid space

Vh u,v,uh,vh;  
Qh p,ph;  
Wh Xoo,Yoo;  
Rh [lamx,lamy,X,Y], [lamxo,lamyo,Xo,Yo]=[0,0,x,y];  
Zh [uo,vo,po] = [0,0,0];

…

varf ba( [lamx,lamy,X,Y], [uh,vh,ph] ) =  
int2d(Ths, qft=qf9pT, mapt=[Xo,Yo]) (  
c1 \* trace(Grad(lamx,lamy)’ \* (Grad(Xo,Yo) \* Grad(uh,vh)))  
+ c2 \* ( **lamx \* uh+lamy \* vh** ) );

Question 1: ‘lamx’ and ‘uh’ are in different FEM spaces using two different meshes, can we compute “lamx \* uh+lamy \* vh” ? Notice that **uh** is defined in Vh using Thf, and **lamx** is defined in Rh using Ths, and Thf and Ths are two different meshes for fluid and solid respectively.

Question 2: Is the FEM interpolation matrix hidden inside FreeFEM++ to transfer information between two meshes?

Thanks in advance!  
Yongxing.
