summaryrefslogtreecommitdiff
path: root/log-fourier_integrator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'log-fourier_integrator.cpp')
-rw-r--r--log-fourier_integrator.cpp6
1 files changed, 6 insertions, 0 deletions
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;