When we consider the unit square [0,1]^2. We can compute the FFT of a P1 function u by using dfft(u[ ], nx, -1).
I would like to know if it is somehow possible to use this trick inside an integral so to express something like
varf a(u,v) = int(Th)(eigenValues .* dfft(u[ ]) .* ddft(v[ ])) ;
This would permit me to solve the following variational formula
where Ae is a diagonal operator for the Fourier Basis and so using fft allows us to construct the associated matrix quickly.