CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Any experts on FFTW?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By jinhua2015

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 26, 2015, 09:20
Default Any experts on FFTW?
  #1
New Member
 
Join Date: Dec 2015
Posts: 5
Rep Power: 10
jinhua2015 is on a distinguished road
Hi,

I recently got a Fortran77 DNS code and I would like to replace all the fft-replated routines there with FFTW3 (currently the code is equipped with FFTPACK. I notice that the code will blow up in the current setting; that's why I'm trying to use FFTW3.) By the way, is it known that FFTPACK is less stable than FFTW3? I have no idea about this. It's just my supervisor asked me to try that.....

Now I'm playing with FFTW3. I am stuck at the call of dfftw_plan_many_dft_r2c_, which is a routine for transforming many real-data arrays of same size to complex. In Fortran, the layout of data structure is column-major.

The following is what I have tried. I would like to column-transform or row transform a 2D real data array. For real data a(Nx,Nz), I tried first to transform the columns, that is Nz 1D array of size Nx. The plan is designed as follows

call dfftw_plan_many_dft_r2c_(plan_forward,1,Nx,Nz, a,Nx,1,Nx, b,Nxc,1,Nxc,FFTW_ESTIMATE)

where b is complex output data of size (Nxc,Nz) and Nxc=Nx/2+1. The results can be understood.

But when I tried to transform the rows, that is Nx 1D array of size Nz. I design the plan as

call dfftw_plan_many_dft_r2c_(plan_forward2,1,Nz,Nx, a,Nz,Nz,1, d,Nzc,Nzc,1,FFTW_ESTIMATE)

where d is complex output data of size (Nx,Nzc) and Nzc=Nz/2+1. The results are wrong. I can't understand why that's the case. Is there any problem of my plan designing? Thanks for your help.

jinhua
aerosayan likes this.
jinhua2015 is offline   Reply With Quote

 


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Experts in Simulating BUbble Column Reactors aliyah Main CFD Forum 7 June 19, 2012 02:38
Post-processing U field with fftw Pascal_doran OpenFOAM Post-Processing 1 November 23, 2010 03:05
FFTW for Fortran Benjamin Cassart Main CFD Forum 3 August 1, 2007 10:31
help me experts chelesa CFX 0 February 15, 2004 03:44
invitation for CFD experts ROOH-UL-AMIN KHURRAM Main CFD Forum 2 March 17, 2000 00:02


All times are GMT -4. The time now is 14:32.