Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

FFTW3 normalization Question

brianreinhold
Novice
366 Views

I cannot not figure out FFTW3 normalization process when going from spectral space to grid point space back to spectral space. The transforms on both sides consist of all real data.

In a nutshell is do I need to normalize BOTH going from spectral to grid and grid to spectral or just going from spectral to grid?

I am integrating a dynamic system which has nonlinear terms. So every time step I need to transform from spectral to grid, perform some computations on the grid, and then transform back.

I need to calculate the following

J(A,B) = dA/dx * dB/dy - dA/dy * dB/dx 
where A(k,l) = (ac(k,l)cosknx + as(k,l)sinknx)sinly + az(l)cosly                                               and   B(k,l) = (bc(k,l)cosknx + bs(k,l)sinknx)sinly + bz(l)cosly

So I have set up plans for each of these transform structures:

cosknxsinly
sinknxsinly
cosknxcosly
sinknxcosly
sinly

I compute the derivatives in spectral space but to do the multiplications I transform the spectral components to a data grid. Now I normalize each of the input spectral components by 

cosknxsinly: Normalization factor is 1/(2*(Nx - 1)* 2*(Ny + 1))
sinknxsinly: Normalization factor is 1/(2*(Nx + 1)* 2*(Ny + 1))
cosknxcosly: Normalization factor is 1/(2*(Nx - 1)* 2*(Ny - 1))
sinknxcosly: Normalization factor is 1/(2*(Nx + 1)* 2*(Ny - 1))

and do the transform.

I am assuming that the grid points I get are now what I want. Okay, now I have created a few of these grid arrays, do the necessary multiplications and have a final 2-d grid array of dimension G3(Nx, Ny).  Now I have transform back to spectral space. This will require several transforms. 

But my question is, on the transform back do I need to normalize again? My understanding is that normalization is only needed going from spectral to grid. Going from grid to spectral normalization is not needed.

0 Kudos
0 Replies
Reply