diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-04-03 18:33:16 -0300 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-04-03 18:33:16 -0300 |
commit | c62be882352bbb6c164d0c6406784357c046a895 (patch) | |
tree | 27cbace722c52183dffb05603a2f01e56fc2317e /fourier_integrator.cpp | |
parent | b180d1a1494ea5ecfdf6f5ad1293ec94b8e9829c (diff) | |
download | code-c62be882352bbb6c164d0c6406784357c046a895.tar.gz code-c62be882352bbb6c164d0c6406784357c046a895.tar.bz2 code-c62be882352bbb6c164d0c6406784357c046a895.zip |
Don't change γ every iteration
Diffstat (limited to 'fourier_integrator.cpp')
-rw-r--r-- | fourier_integrator.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fourier_integrator.cpp b/fourier_integrator.cpp index 9e41b5f..d83fb9d 100644 --- a/fourier_integrator.cpp +++ b/fourier_integrator.cpp @@ -146,14 +146,16 @@ int main(int argc, char* argv[]) { z *= Cnew[0]; - if (ΔC < ΔCprev) { - γ = std::min(1.1 * γ, 1.0); - } else { - γ /= 2; + if (it % maxIterations == 0) { + if (ΔC < ΔCprev) { + γ = std::min(1.1 * γ, 1.0); + } else { + γ /= 2; + } + + ΔCprev = ΔC; } - ΔCprev = ΔC; - std::cerr << it << " " << p << " " << s << " " << τ₀ << " " << y << " " << sqrt(2 * ΔC / C.size()) << " " << γ << std::endl; } |