2
$\begingroup$

I am using the FFTW MPI in C.

I have a simple question.

Quoting from fftw.org

The multi-dimensional transforms of FFTW, in general, compute simply the separable product of the given 1d transform along each dimension of the array. Since each of these transforms is unnormalized, computing the forward followed by the backward/inverse multi-dimensional transform will result in the original array scaled by the product of the normalization factors for each dimension (e.g. the product of the dimension sizes, for a multi-dimensional DFT).

Imagine we have $\tilde{A}$ in the Fourier space with the coresponding $A$ in the physical space. I want to compute $\tilde{B}$ that is $\tilde{A}^2$. The normalization factor is $F_{norm}$.

The idea is $A=IFFT(\tilde{A})$ (inverse fourier transform, A now is real)

So

$B=A^2$

$A=A*F_{norm}$, $B=B*F_{norm}$ (we have to normalize before to transform back to Fourier space.)

$\tilde{A}=FFT(A)$

$\tilde{B}=FFT(B)$

The questions are:

1) Do I normalize A before or after the computation of B ?

2) Does anything change if B is used directly in physical space ?

$\endgroup$
  • 2
    $\begingroup$ It does not matter when you rescale the variable you have transformed. The important fact is that $\mathcal{F}^{-1}[\mathcal{F}(f)]=f$. $\endgroup$ – HBR Feb 19 '18 at 13:39
  • $\begingroup$ Thank you, for the help. I agree that for A itself it does not matter. But I think (maybe I am wrong), that if B depend on A, so it matters when I rescale the variable A. Maybe I have not be clear about my doubts. The question is: when do I rescale A with respect to the moment I compute B ? $\endgroup$ – GMV871 Feb 19 '18 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.