rlft3.f90 (3D Fast Fourier transform subroutine in Fortran)


fateme.mirjani
07-07-2008, 02:32 AM
Dear all;

I'm going to use rlft3.f90 (3D Fast Fourier transform subroutine in Numerical Recipes in Fortran book)
I have constructed a 100*100*100 mesh as data. (a special Step-Function)
I should call rlft3(data,speg,nn1,nn2,nn3,isign).
-----------------------------------------------------------------------------
SUBROUTINE rlft3(data,speq,nn1,nn2,nn3,isign)
INTEGER isign,nn1,nn2,nn3
COMPLEX data(nn1/2,nn2,nn3),speq(nn2,nn3)
-----------------------------------------------------------------------------
1- I don't understand why for data is written nn1/2 ? I have a 100*100*100 mesh!!! Does it mean for a 100*100*100 mesh the 50*100*100 is necessary?

2- I don't know what should I put instead of speq? If speg is an output , where is the final answer of subroutine put?
When I put the 50*100*100 data as input, I envisage the segmentation fault.

I'm anxiously looking forward your reply and guidlines.
With my best regards,
Fatemeh