aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-07-26 15:34:29 +0200
committerAnton Khirnov <anton@khirnov.net>2020-07-26 15:34:29 +0200
commit6fc86e405aa6e0a73665e8f1d2232852b4d74264 (patch)
treed7858b2371a0f11a3dacfa06178790ad51c39003
parentf77db5c68f96cc993049ac91e191d7a10504a352 (diff)
init: make the delta relative to the amplitude
-rw-r--r--init.c4
1 files 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;