From 4de44a127a5ea1f3825b0e53b83a13d9aa1fd3c8 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Sat, 19 Apr 2025 00:46:43 -0300 Subject: Tweaking form of iterations --- log-fourier_integrator.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'log-fourier_integrator.cpp') diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp index 061cb08..fd8b220 100644 --- a/log-fourier_integrator.cpp +++ b/log-fourier_integrator.cpp @@ -100,12 +100,20 @@ int main(int argc, char* argv[]) { for (unsigned n = 0; n < N; n++) { Rtnew[n] = (1.0 + pow(β, 2) * RddfCt[n] * Rt[n]) / (μ + 1i * fft.ν(n)); - Ctnew[n] = (2 * Γ₀ * std::conj(Rtnew[n]) / (1 + pow(τ₀ * fft.ν(n), 2)) + pow(β, 2) * (RddfCt[n] * Ct[n] + dfCt[n] * std::conj(Rtnew[n]))) / (μ + 1i * fft.ν(n)); // Ctnew[n] = - 2 * Γ₀ * Rtnew[n].imag() / (1 + pow(τ₀ * fft.ν(n), 2)) / fft.ν(n); } + std::vector Rnew = fft.inverse(Rtnew); + for (unsigned n = 0; n < N; n++) { + RddfC[n] = Rnew[n] * ddf(λ, p, s, C[n]); + } + RddfCt = fft.fourier(RddfC, false); + + for (unsigned n = 0; n < N; n++) { + Ctnew[n] = (2 * Γ₀ * std::conj(Rtnew[n]) / (1 + pow(τ₀ * fft.ν(n), 2)) + pow(β, 2) * (RddfCt[n] * Ct[n] + dfCt[n] * std::conj(Rtnew[n]))) / (μ + 1i * fft.ν(n)); + } + std::vector Cnew = fft.inverse(Ctnew); - std::vector Rnew = fft.inverse(Rtnew); ΔC = 0; for (unsigned i = 0; i < N; i++) { -- cgit v1.2.3-70-g09d2