Hello,
I am looking to find the correct method to calculate an integral over a 2D mesh defined as
\int_\Omega u_1(x,y)e^{iqx} u_2(x,y) dx dy
where q is a constant, u_1, u_2 are functions over the mesh.
Here is attempt 1 (for q = 1):
f = Expression('cos(x[0])', degree = 1)
integral_real = assemble(u1*f*u2*dx)
g = Expression('sin(x[0])', degree = 1)
integral_imag = assemble(u1*g*u2*dx)
print(integral_real + 1j*integral_imag)
Is this the right way to calculate such an integral?