summaryrefslogtreecommitdiff
path: root/log-fourier_integrator.cpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2025-05-16 09:24:25 -0300
committerJaron Kent-Dobias <jaron@kent-dobias.com>2025-05-16 09:24:25 -0300
commit7fe2d05c02a76b8db72a5a2e1ad8232e6da1ebd2 (patch)
tree7a9c72387e6fc6afe481176a1c776c33a5cd5c44 /log-fourier_integrator.cpp
parent0dcab410621ff56ee3a51eb8cda00f9d2ba2609d (diff)
parente9b5f2c6e25423fa492d3c5648be9db9ed4f6b2e (diff)
downloadcode-7fe2d05c02a76b8db72a5a2e1ad8232e6da1ebd2.tar.gz
code-7fe2d05c02a76b8db72a5a2e1ad8232e6da1ebd2.tar.bz2
code-7fe2d05c02a76b8db72a5a2e1ad8232e6da1ebd2.zip
Merge branch 'master' of git:research/level-set_walks/code
Diffstat (limited to 'log-fourier_integrator.cpp')
-rw-r--r--log-fourier_integrator.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp
index 1402678..dc7240a 100644
--- a/log-fourier_integrator.cpp
+++ b/log-fourier_integrator.cpp
@@ -124,7 +124,9 @@ int main(int argc, char* argv[]) {
Ȓₜ₋₁[n] = (Real)1.0 / (μ₀ + II * fft.ν(n));
}
} else {
- logFourierLoad(Cₜ₋₁, Rₜ₋₁, Ĉₜ₋₁, Ȓₜ₋₁, p, s, λ, τ₀, β₀, log2n, Δτ, logShift);
+ if (!logFourierLoad(Cₜ₋₁, Rₜ₋₁, Ĉₜ₋₁, Ȓₜ₋₁, p, s, λ, τ₀, β₀, log2n, Δτ, logShift)) {
+ return 1;
+ }
μₜ₋₁ = estimateZ(fft, Cₜ₋₁, Ĉₜ₋₁, Rₜ₋₁, Ȓₜ₋₁, p, s, λ, τ₀, β₀);
}
@@ -190,12 +192,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ₜ;