diff options
-rw-r--r-- | log-fourier_integrator.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp index 2359c80..e127fc1 100644 --- a/log-fourier_integrator.cpp +++ b/log-fourier_integrator.cpp @@ -147,6 +147,13 @@ int main(int argc, char* argv[]) { Real C₀ = Cₜ₊₁[0]; + + Real Rmax = 0; + for (unsigned i = 0; i < N; i++) { + if (Rₜ₊₁[N-1-i] > Rmax) Rmax = Rₜ₊₁[N-1-i]; + Rₜ₊₁[N-1-i] = Rmax; + } + bool trigger0 = false; bool trigger1 = false; for (unsigned i = 0; i < N; i++) { |