From 6fc86e405aa6e0a73665e8f1d2232852b4d74264 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 26 Jul 2020 15:34:29 +0200 Subject: init: make the delta relative to the amplitude --- init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.c b/init.c index 4df0f8f..e39d1b1 100644 --- a/init.c +++ b/init.c @@ -358,8 +358,8 @@ int td_solve(TDContext *td, double *coeffs_init[3]) // second branch requested and no user-provided initial guess // execute two lower-branch solutions and extrapolate to get to the upper branch const int N = NB_EQUATIONS * td->nb_coeffs[0] * td->nb_coeffs[1]; - const double delta = 1e-5; - const double a1 = a0 - delta; + const double delta = 1e-3; + const double a1 = a0 * (1.0 - delta); double cur_amplitude, new_amplitude, step; -- cgit v1.2.3