diff options
-rw-r--r-- | get_energy.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/get_energy.cpp b/get_energy.cpp index bb01095..449c2c6 100644 --- a/get_energy.cpp +++ b/get_energy.cpp @@ -43,9 +43,9 @@ private: Real Δω; Real Δτ; public: - FourierTransform(unsigned n, Real Δω, Real Δτ) : a(2 * n), â(n + 1), Δω(Δω), Δτ(Δτ) { - plan_r2c = fftw_plan_dft_r2c_1d(2 * n, a.data(), reinterpret_cast<fftw_complex*>(â.data()), 0); - plan_c2r = fftw_plan_dft_c2r_1d(2 * n, reinterpret_cast<fftw_complex*>(â.data()), a.data(), 0); + FourierTransform(unsigned n, Real Δω, Real Δτ, unsigned flags = 0) : a(2 * n), â(n + 1), Δω(Δω), Δτ(Δτ) { + plan_r2c = fftw_plan_dft_r2c_1d(2 * n, a.data(), reinterpret_cast<fftw_complex*>(â.data()), flags); + plan_c2r = fftw_plan_dft_c2r_1d(2 * n, reinterpret_cast<fftw_complex*>(â.data()), a.data(), flags); } ~FourierTransform() { @@ -127,7 +127,7 @@ int main(int argc, char* argv[]) { Real y = y₀; - FourierTransform fft(n, Δω, Δτ); + FourierTransform fft(n, Δω, Δτ, FFTW_ESTIMATE); while (y += Δy, y <= yₘₐₓ) { std::vector<Real> C(2 * n); |