interpolate from a small mesh **Ths** to a larger mesh **Th**, for example

fespace Vh(Th, P2);

Vh u;

fespace Vhs(Ths, P2);

Vh us=sin(x+y);

In default, **u=us** would extend the value of us to the whole Th, how can we let u=0 on Th-Ths (zero extension)?

interpolate from a small mesh **Ths** to a larger mesh **Th**, for example

fespace Vh(Th, P2);

Vh u;

fespace Vhs(Ths, P2);

Vh us=sin(x+y);

In default, **u=us** would extend the value of us to the whole Th, how can we let u=0 on Th-Ths (zero extension)?

Yes a add the function Chi to solve this problem : Chi(Ths) and Chi(Th)

so just do

just write u*Chi(Th) ( zero outside of Th).