Hi, All:
I have a 2 dimensional array, and I want to Fourier Transform in 1
dimension. Now what I am doing is looping the other dimension and call
the dfftw_plan_r2r_1d subroutine. Is there a better way to do this? OR
does FFTW provide any subroutine(parameter) to deal with this kind of
situation?
Thanks a lot.
Bin
code:
====================================
program ft2d
implicit none
include 'fftw3.f'
integer :: i
integer, parameter :: dim1 = 256, dim2 = 256
double precision :: x(dim1, dim2), ftx(dim1, dim2)
integer*8 :: forwd
do i = 1, dim1
call dfftw_plan_r2r_1d(forwd, dim2, x(i, :), ftx(i, :),
FFTW_RODFT00, FFTW_ESTIMATE)
call dfftw_execute(forwd)
call dfftw_destroy_plan(forwd)
enddo
end


|