diff options
-rw-r--r-- | log-fourier.cpp | 7 | ||||
-rw-r--r-- | log-fourier_integrator.cpp | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/log-fourier.cpp b/log-fourier.cpp index 3ffa3c6..7461a70 100644 --- a/log-fourier.cpp +++ b/log-fourier.cpp @@ -1,4 +1,5 @@ #include "log-fourier.hpp" +#include <complex> LogarithmicFourierTransform::LogarithmicFourierTransform(unsigned N, Real k, Real Δτ, unsigned pad) : N(N), pad(pad), k(k), Δτ(Δτ) { τₛ = -0.5 * N; @@ -83,7 +84,11 @@ std::vector<Real> LogarithmicFourierTransform::inverse(const std::vector<Complex for (Real σ : σs) { for (unsigned n = 0; n < pad * N; n++) { if (n < N) { - a[n] = ĉ[n] * exp((1 - k) * ω(n)); + if (σ < 0) { + a[n] = std::conj(ĉ[n]) * exp((1 - k) * ω(n)); + } else { + a[n] = ĉ[n] * exp((1 - k) * ω(n)); + } } else { a[n] = 0; } diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp index 531565c..f0c5649 100644 --- a/log-fourier_integrator.cpp +++ b/log-fourier_integrator.cpp @@ -111,8 +111,6 @@ int main(int argc, char* argv[]) { for (unsigned n = 0; n < N; n++) { Ȓₜ₊₁[n] = (1.0 + pow(β, 2) * RddfCt[n] * Ȓₜ[n]) / (μ + 1i * fft.ν(n)); -// Ĉₜ₊₁[n] = - 2 * Γ₀ * Ȓₜ₊₁[n].imag() / (1 + pow(τ₀ * fft.ν(n), 2)) / fft.ν(n); - Ĉₜ₊₁[n] = (2 * Γ₀ * std::conj(Ȓₜ₊₁[n]) / (1 + pow(τ₀ * fft.ν(n), 2)) + pow(β, 2) * (RddfCt[n] * Ĉₜ[n] + dfCt[n] * std::conj(Ȓₜ₊₁[n]))) / (μ + 1i * fft.ν(n)); } std::vector<Real> Rₜ₊₁ = fft.inverse(Ȓₜ₊₁); @@ -176,7 +174,7 @@ int main(int argc, char* argv[]) { + (2 - h₂ₙ / h₂ₙ₊₁) * f₂ₙ₊₂ ); } - E *= β; +// E *= β; std::cerr << "\x1b[2K" << "\r"; std::cerr << β << " " << μ << " " << Ĉₜ[0].real() << " " << E << " " << γ << std::endl; |