From f2ac3dbe40e12102f87e9d2b28cc782c1be43df1 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Sat, 19 Apr 2025 16:07:28 -0300 Subject: Temper μ changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- log-fourier_integrator.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'log-fourier_integrator.cpp') 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; + } + } } } -- cgit v1.2.3-70-g09d2