1 function U = poisson_fft2(F,h,power)
\r
2 % U = poisson_fft2(F,h,power)
\r
3 % multiply grid function on a rectangle by power of Laplacian
\r
4 % with zero boundary conditions, using the sine Fourier series
\r
6 % F matrix, values of the function on rectangle
\r
8 % power the desired power of the laplacian
\r
10 % U (-laplace)^power (F)
\r
14 X=poisson_1d_eig(n(1),h(1));
\r
15 Y=poisson_1d_eig(n(2),h(2));
\r
16 % VV=(2/(n+1)*ones(n,n)./(V'(ones(1,n)+ones(1,n)*V');
\r
20 U(i,j)=U(i,j)*((X(i)+Y(j))^power);
\r
23 U=dst2(U)*4/((n(1)+1)*(n(2)+1)); % scale for nonunitary DST2
\r