Numerical Recipes Forum  

Go Back   Numerical Recipes Forum > Obsolete Editions Forum > Methods: Chapters 12 and 13

Reply
 
Thread Tools Display Modes
  #1  
Old 06-15-2007, 12:38 AM
YueBin YueBin is offline
Registered User
 
Join Date: Jun 2007
Posts: 1
Difference between subroutine rlft3(data,speq,nn1,nn2,nn3) and the FFTW

Hi,all,

I write a test code as follow:

real in1(n1,n2,n3)
real in2(n1+2,n2,n3)
complex inny(n2,n3)

do i3=1,n3
do i2=1,n2
do i1=1,n1
in1(i1,i2,i3)= real(i1*i2*i3)
in2(i1,i2,i3)= real(i1*i2*i3)
enddo
enddo
enddo

in2(n1+1:n1+2,:,=0.0
inny=0.0

then I do inverse FFT to in1 and in2 ,infact ,they are the same.

call rfftwnd_f77_mpi(iplan,1,in2,work,1,FFTW_NORMAL_ORD ER)
call rlft3(in1,inny,n1,n2,n3,-1)

but the result is different:
in1 is :
-4.500000
13.50000
1.500000
-4.500000
1.500000
-4.500000
-0.5000000
1.500000

and in2(1:n1,1:n3,1:n3) is
9.000000
9.000000
-3.000000
-3.000000
-3.000000
-3.000000
1.000000
1.000000

why the result between NR and FFTW is so different?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:55 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.