From 571ff3eb90dfacf5412fc64fefbd18948f2736bc Mon Sep 17 00:00:00 2001 From: Hanno Rein Date: Thu, 20 Jul 2023 15:16:38 -0400 Subject: [PATCH] style to avoid large diff --- src/integrator_ias15.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/integrator_ias15.c b/src/integrator_ias15.c index 6fadbf967..5f5d2cb1b 100644 --- a/src/integrator_ias15.c +++ b/src/integrator_ias15.c @@ -616,22 +616,22 @@ static int reb_integrator_ias15_step(struct reb_simulation* r) { dt_new = dt_done/safety_factor; // by default, increase timestep a little } } - + if (fabs(dt_new)ri_ias15.min_dt) dt_new = copysign(r->ri_ias15.min_dt,dt_new); - + if (fabs(dt_new/dt_done) < safety_factor) { // New timestep is significantly smaller. - // Reset particles + // Reset particles for(int k=0;kdt/r->dt_last_done; predict_next_step(ratio, N3, er, br, e, b); } - + return 0; // Step rejected. Do again. - } + } if (fabs(dt_new/dt_done) > 1.0) { // New timestep is larger. if (dt_new/dt_done > 1./safety_factor) dt_new = dt_done /safety_factor; // Don't increase the timestep by too much compared to the last one. }