diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-04-19 16:07:28 -0300 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-04-19 16:07:28 -0300 |
commit | f2ac3dbe40e12102f87e9d2b28cc782c1be43df1 (patch) | |
tree | efef8e2d4fad650aed12313d1aef577a9758abbc /log-fourier_integrator.cpp | |
parent | 78edd06a69e85da5a448425f12caa4b6b6c80379 (diff) | |
download | code-f2ac3dbe40e12102f87e9d2b28cc782c1be43df1.tar.gz code-f2ac3dbe40e12102f87e9d2b28cc782c1be43df1.tar.bz2 code-f2ac3dbe40e12102f87e9d2b28cc782c1be43df1.zip |
Temper μ changes
Diffstat (limited to 'log-fourier_integrator.cpp')
-rw-r--r-- | log-fourier_integrator.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp index f5dbfc7..a9c5b40 100644 --- a/log-fourier_integrator.cpp +++ b/log-fourier_integrator.cpp @@ -143,7 +143,15 @@ int main(int argc, char* argv[]) { if (std::abs(Cₜ[0] - 1) < ε) { break; } else { - μ *= sqrt(Cₜ[0]); + if (std::abs(sqrt(Cₜ[0]) - 1.0) < 1e-2) { + μ *= sqrt(Cₜ[0]); + } else { + if (Cₜ[0] > 1) { + μ *= 1.01; + } else { + μ /= 1.01; + } + } } } |