|
[Sponsors] |
December 26, 2015, 09:20 |
Any experts on FFTW?
|
#1 |
New Member
Join Date: Dec 2015
Posts: 5
Rep Power: 10 |
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 |
|
|
|
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 |