Re: FFTW Fortran Real2Complex R2C output array structure? fftw_plan_dft_r2c_3d?
- From: "Steven G. Johnson" <stevenj@xxxxxxxxxxxx>
- Date: Wed, 13 Jun 2007 02:40:36 -0700
On Jun 12, 1:16 pm, "Robert S." <r...@xxxxxxxxxxxxxxx> wrote:
I'm using the FFTW package and am using the fortan wrappers
to compute a 3D transform. This I seem to do successfully, however
I can not seem to disentangle the raw output.>From studying the figure on page 8 of the fftw 3.1.2 manual
[...]
(I don't shuffle the 3rd dimension since this runs from 1---ngrid3/2+1
and already
contains just the +ve frequncies.)
Remember that a Fortran array corresponds to a C array with *reversed*
dimensions (column-major vs. row-major format). So, in the C FFTW
interface, for an r2c (real-input) transform the last dimension is cut
in ~half, but in the Fortran interface the *first* dimension is cut in
~half.
This is discussed in the FFTW manual. See the third bullet point of:
http://www.fftw.org/doc/Fortran_002dinterface-routines.html
and the last example of:
http://www.fftw.org/doc/Fortran-Examples.html
Regards,
Steven G. Johnson
.
- Follow-Ups:
- References:
- Prev by Date: Re: Average dB
- Next by Date: Re: real exact pruned DFT?
- Previous by thread: FFTW Fortran Real2Complex R2C output array structure? fftw_plan_dft_r2c_3d?
- Next by thread: Re: FFTW Fortran Real2Complex R2C output array structure? fftw_plan_dft_r2c_3d?
- Index(es):
Relevant Pages
|