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.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp
index b819456..fe0751f 100644
--- a/log-fourier_integrator.cpp
+++ b/log-fourier_integrator.cpp
@@ -184,12 +184,9 @@ int main(int argc, char* argv[]) {
Ȓₜ[i] += γ * (Ȓₜ₊₁[i] - Ȓₜ[i]);
}
- if (ΔCₜ > ΔCₜ₋₁ * 5) {
+ if (ΔCₜ > ΔCₜ₋₁ * 5 && ΔCₜ < 1e-9) {
γ = std::max(γ / 2, (Real)1e-2);
}
- if (ΔCₜ < ΔCₜ₋₁) {
- γ = std::min(1.001 * γ, (Real)1);
- }
ΔCₜ₋₁ = ΔCₜ;