rlft3.f (3D Fast Fourier transform subroutine)???
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.fortran Profile…
 Up
rlft3.f (3D Fast Fourier transform subroutine)???         


Author: Fatemeh
Date: Jul 5, 2008 02:24

Dear all;

I'm going to use rlft3.f (3D Fast Fourier transform subroutine in
Numerical Recipes book )
I have constructed a 107*107*107 mesh for data.
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
107*107*107 mesh!!!
2- Is it true to put nn1=nn2=nn3=107
3- I don't know what should I put instead of speq ?

I'm anxiously looking forward your reply and guidlines.
With my best regards,
Fatemeh
4 Comments
Re: rlft3.f (3D Fast Fourier transform subroutine)???         


Author: dominiq
Date: Jul 5, 2008 02:41

On 5 juil, 11:24, Fatemeh gmail.com> wrote:
> Dear all;
>
> I'm going to use rlft3.f (3D Fast Fourier transform subroutine in
> Numerical Recipes book )
> I have constructed a 107*107*107 mesh for data.
> 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
> 107*107*107 mesh!!!
> 2- Is it true to put nn1=nn2=nn3=107
> 3- I don't know what should I put instead of speq ?
>
> I'm anxiously looking forward your reply and guidlines.
> With my best regards,
> Fatemeh ...
Show full article (1.18Kb)
no comments
Re: rlft3.f (3D Fast Fourier transform subroutine)???         


Author: Fatemeh
Date: Jul 5, 2008 03:36

On Jul 5, 1:41 pm, dominiq wrote:
> On 5 juil, 11:24, Fatemeh gmail.com> wrote:
>
>
>
>> Dear all;
>
>> I'm going to use rlft3.f (3D Fast Fourier transform subroutine in
>> Numerical Recipes book )
>> I have constructed a 107*107*107 mesh for data.
>> 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
>> 107*107*107 mesh!!!
>> 2- Is it true to put nn1=nn2=nn3=107
>> 3- I don't know what should I put instead of speq ? ...
Show full article (1.42Kb)
no comments
Re: rlft3.f (3D Fast Fourier transform subroutine)???         


Author: dominiq
Date: Jul 5, 2008 05:00

On 5 juil, 12:36, Fatemeh gmail.com> wrote:
> On Jul 5, 1:41 pm, dominiq wrote:
>
>> On 5 juil, 11:24, Fatemeh gmail.com> wrote:
>
>>> Dear all;
>
>>> I'm going to use rlft3.f (3D Fast Fourier transform subroutine in
>>> Numerical Recipes book )
>>> I have constructed a 107*107*107 mesh for data.
>>> 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
>>> 107*107*107 mesh!!!
>>> 2- Is it true to put nn1=nn2=nn3=107
>>> 3- I don't know what should I put instead of speq ? ...
Show full article (1.75Kb)
no comments
Re: rlft3.f (3D Fast Fourier transform subroutine)???         


Author: James Van Buskirk
Date: Jul 5, 2008 07:38

"dominiq" wrote in message
news:7061d478-b8c5-4a07-ab4f-9acb9d95d350@l64g2000hse.googlegroups.com...
> The basic FFT requires sizes that are powers of 2. Some packages
> extend that to powers of small primes (typically 3 and 5), but I don't
> think this is the case for Numerical Recipes. Nevertheless 107 is a
> prime and is unlikely to be accepted in any FFT package.

107 is kind of ugly because (107-1)/2 = 53 which I do in fact have an
FFT for:

http://home.comcast.net/~kmbtib/codelets.ZIP

but 53 is rather ugly in itself. For some of these primes it gets
more efficient to use the chirp-z method rather than Rader's method,
but you can do an FFT of any order if you really have to.

--
write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
6.0134700243160014d-154/),(/'x'/)); end
no comments