xylthx:

However, I was getting totally different results for the applications in real and Fourier space.


Based on your code it seems you are using the same grid and I don’t know how you’ve verified that the same results would be expected.
I.e. sampling can be seen as a multiplication with a Dirac comb. The Convolution Theorem explains that “Convolution in time domain equals multiplication in frequency domain” and vice versa. Based on this you would have to respect the Nyquist frequency to avoid aliasing in any domain.
However, as already said I don’t see any frequency calculation, sampling rate etc.