<- [[:programming]] ====== transform spectral coeff to physical data points ====== //emmanuel germaine, 2010-08-28 10:14 // ~~DISCUSSION~~ Dear Prof. Gibson, We can determine the physical values from the spectral coefficients by evaluating the expansion sum (eqn 20 in the user's manual.) I wanted to compared the physical values computed by this sum with the values returned by the method u.makephysical(). This method use the FFTW algorithm and I was expecting no difference. The fact is that, I do not obtained the same results. I have attached part of the code I am using. Do you think that something is incorrect ? As the width of the channel is [a,b] = [-1.0,1.0], I haven't normalized the Chebyshev polynomials. Example of results displayed : 0.00258953 // u from expansion sum 0.00604268 // return of u.makePhysical (FFTW) Regards, Emmanuel { double pi =3.1415926 ; Complex I(0.0,1.0); Complex sum_u(0.0,0.0); int pause; nx = 5; ny = 5; nz = 5; //display gridpoint coordinates x,y,z std::cout << u.x(nx) << ' ' << u.y(ny) << ' ' << u.z(nz) << endl ; //compute physical value using expansion sum and display u.makeSpectral(); for(int mz=0;mz> pause; }