//This example code is used //to familiarize one with what exactly //and how FFTW performs FFT. // compile by // g++ -lm -I/usr/local/include -L/usr/local/lib -lrfftw -lfftw fftw_exercise_3by3.C // The routine is from fftw version 2. The newest version 3 might have different // format. #include #include #include "rfftw.h" using namespace std; const int Nmesh=3; const int Nmesh2=9; const double twopi=6.283185307; int main(int argc, char **argv) { char buf[200]; int nyquist[3],blklen; int ratio, axes, zone,i,j; double kmin, kmax; float xdummy; float kvector[3]; char inname[100],outname[100]; fftw_complex *A, *B; rfftwnd_plan p, pinv; fftw_real scale = 1.0 / (Nmesh *Nmesh); if(argc<1) { cout<<"Parameters are missing"<"<