Multiplying two integral on FE

Hi,

I brand new to Freefem and I don’t manage to code this variational problem :

Where Q=(0,1)^2 and (e_1,e_2) is the canonical basis of R^2. I have an error while integrating w_i over Q. Here is my code :

int k=8;
int s=2^(k);
mesh Th = square(s, s);
//The finite element space defined over Th is called here Vh
fespace Vh(Th, P1, periodic=[[2, y], [4, y], [1, x], [3, x]]);
Vh u, v;// Define u and v as piecewise-P1 continuous functions
// Define f
func f= 1 + 100cos(x)^2sin(y)^2;
// Define and solve the PDE
solve nohomo(u, v)
= int2d(Th)( f*(dx(u)*dx(v) + dy(u)*dy(v)) )
+ int2d(Th)(u) * int2d(Th)(v)
+ int2d(Th)(f * dx(v)) ;
plot(u);

In the code reduced the formula (11) of the picture, you don’t need to worry about that, since my issue is that i can’t use “int2d(Th)(u)”.

And here is the error :

21 : + int2d(Th)(u) error operator <20CDomainOfIntegration>, <10LinearCombI7MGauche4C_F0E>
List of choices
( <12FormBilinear> : <20CDomainOfIntegration>, <10LinearCombISt4pairI7MGauche6MDroitE4C_F0E> )
( : <20CDomainOfIntegration>, )
( : <20CDomainOfIntegration>, )
( <10FormLinear> : <20CDomainOfIntegration>, <10LinearCombI6MDroit4C_F0E> )
Error line number 21, in file C:\Users\theop\Desktop\test.edp, before token )

What is wrong ?

Thanks !

Nothing is wrong to day you have tu write

term like int2d(Th)(u) * int2d(Th)(v) in variational form because this corresponding a a full matrix.

Of course this this a low rank matrix so this possible to solve this problem with CG or GMRES algorithm
feature in f
Bee is not automatique to day, We are work to add this kind of feature during this year.

So now how to do , follow the script :

freemat.edp (904 Bytes)