From 66e3dec599fc66376f7940e10b5b07276928e453 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Sat, 10 May 2025 17:02:34 -0300 Subject: Also enforce monotonous C --- log-fourier_integrator.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp index 1d64d69..12a3516 100644 --- a/log-fourier_integrator.cpp +++ b/log-fourier_integrator.cpp @@ -184,6 +184,12 @@ int main(int argc, char* argv[]) { } } + Real Cmax = 0; + for (unsigned i = 0; i < N; i++) { + if (Cₜ₊₁[N-1-i] > Cmax) Cmax = Cₜ₊₁[N-1-i]; + Cₜ₊₁[N-1-i] = Cmax; + } + μₜ *= pow(tanh(C₀-1)+1, x); ΔCₜ = 0; -- cgit v1.2.3-70-g09d2