summaryrefslogtreecommitdiff
path: root/log-fourier_integrator.cpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2025-04-19 17:45:38 -0300
committerJaron Kent-Dobias <jaron@kent-dobias.com>2025-04-19 17:45:38 -0300
commit7f9769964d1adeb47098f96a2a24ebc9d95ae258 (patch)
tree4257cfc526e61d23287ca5d5a450ebc4c0a38e07 /log-fourier_integrator.cpp
parentdb0008dbd2d250b6688f07743770c09d58c88e43 (diff)
downloadcode-7f9769964d1adeb47098f96a2a24ebc9d95ae258.tar.gz
code-7f9769964d1adeb47098f96a2a24ebc9d95ae258.tar.bz2
code-7f9769964d1adeb47098f96a2a24ebc9d95ae258.zip
More controls after failure
Diffstat (limited to 'log-fourier_integrator.cpp')
-rw-r--r--log-fourier_integrator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp
index 60bdc76..6a4b71a 100644
--- a/log-fourier_integrator.cpp
+++ b/log-fourier_integrator.cpp
@@ -90,6 +90,7 @@ int main(int argc, char* argv[]) {
std::vector<Complex> Ĉₜ = Ĉₜ₋₁;
std::vector<Complex> Ȓₜ = Ȓₜ₋₁;
+ Real fac = 1;
Real β = 0;
while (β < βₘₐₓ) {
Real μ₁ = 0;
@@ -157,6 +158,7 @@ int main(int argc, char* argv[]) {
Ĉₜ = Ĉₜ₋₁;
Ȓₜ = Ȓₜ₋₁;
μ *= 2;
+ fac /= 2;
μ₁ = 0;
μ₂ = 0;
} else {
@@ -172,7 +174,7 @@ int main(int argc, char* argv[]) {
/* We found an upper bound */
μ₂ = μ;
}
- μ *= sqrt(sqrt(0.1*std::tanh(Cₜ[0]-1)+1));
+ μ *= sqrt(sqrt(fac*std::tanh(Cₜ[0]-1)+1));
} else {
/* Once the bounds are set, we can use bisection */
if (Cₜ[0] > 1) {