FourierFlows / FourierFlows.jl

Tools for building fast, hackable, pseudospectral partial differential equation solvers on periodic domains
https://bit.ly/FourierFlows
MIT License
207 stars 29 forks source link

Fix normalization from uh -> ûₖ #343

Closed navidcy closed 1 year ago

navidcy commented 1 year ago

The example demonstrating the proper way to normalize results from FFT to get $\hat{u}_k$ coefficients was wrong. Instead of $n_x e^{-i k x_0}$ the normalization factor is $n_x e^{i k x_0}$. When $x_0 = -\pi$ that error was overshadowed. I changed the example now to have $x_0 = -2\pi/3$.