diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-05-10 18:16:54 -0300 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-05-10 18:16:54 -0300 |
commit | 20d44bd729ee5f9a4d8542a37131b0ad1aa15c40 (patch) | |
tree | acd5541d676ad2c858bba2ffab84cf998131a740 | |
parent | 75dc30ef643a62c1864435c8655b505da05a4bcb (diff) | |
download | code-20d44bd729ee5f9a4d8542a37131b0ad1aa15c40.tar.gz code-20d44bd729ee5f9a4d8542a37131b0ad1aa15c40.tar.bz2 code-20d44bd729ee5f9a4d8542a37131b0ad1aa15c40.zip |
Adjust β dynamically
-rw-r--r-- | log-fourier_integrator.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp index 627f49e..0dcf49d 100644 --- a/log-fourier_integrator.cpp +++ b/log-fourier_integrator.cpp @@ -241,7 +241,11 @@ int main(int argc, char* argv[]) { logFourierSave(Cₜ, Rₜ, Ĉₜ, Ȓₜ, p, s, λ, τ₀, β, log2n, Δτ, logShift); - β += Δβ; + if (Ĉₜ[0].real() / Ĉₜ₋₁[0].real() > 2) { + Δβ *= 0.5; + } + + β = std::round(1e6 * (β + Δβ)) / 1e6; Cₜ₋₁ = Cₜ; Rₜ₋₁ = Rₜ; Ĉₜ₋₁ = Ĉₜ; |