[SOLVED] Prolongation/restriction matrix

Hi everyone !

I am solving Navier-Stokes equations, on a [P2, P2, P1] space (velocity-velocity-pressure):

func PuPuPp=[P2, P2, P1];
fespace Uvvp(Th, PuPuPp);
Uvvp [ux,uy,up];

Moreover I define a space just for the velocity:

func PuPu=[P2, P2];
fespace Uvv(Th, PuPu);
Uvv [ffx,ffy];

I would like to define a prolongation matrix and a restriction matrix that could be used such that:

matrix projectionMatrix = ???;
matrix restrictionMatrix = ???;
ux[] = projectionMatrix * ffx[];
ffx[] = restrictionMatrix * ux[];

Can anyone, please, explain me how to define such matrices?

Best,

Lucas

You can have a look at the documentation to use the interpolate keyword.

Thank you, that is exactly what I needed!