Multiply a Finite Element function by a vector of scalar functions

Hello all,

I would like multiply a FE function pp by a vector of scalar functions, like this:

fespace VHK0(THK,P0); //useful to locate bubble of the coarse element
fespace PhK(ThK, P1);

func wbarre=[1,x,y];

varf vPi(p,pp)=int2d(ThK)(wbarre*pp); 
A=vPi(VHK0,PhK)

I am expecting thus that A will be a matrix of size (3 x ndof(PhK)).
However it seems that doing “wbarre*pp” is not allowed.

Could someone help me to resolve this problem ?

Thank you in advance,

Best regards,

Loïc,

Hello all, Hello @frederichecht

Should “wbarre” be a FE functions too ?

Best regards,

Loïc,