Solved. For the initialization I was using
psix_align = fftw.n_byte_align(psi0, fftw.simd_alignment, dtype='complex64')
psik_align = fftw.n_byte_align(np.zeros_like(psi0), fftw.simd_alignment, dtype='complex64')
I needed to replace complex64
with complex128
. Now I get the same result. That's probably due to the fact that the numbers involved are very small (see the 1e-11
on the z-axis).
Edit: Maybe someone can add pyfftw
to the tags of the question?