Skip to content

Commit

Permalink
Reset BS/IAS15 at end of TRACE step to reduce file size.
Browse files Browse the repository at this point in the history
  • Loading branch information
hannorein authored Aug 27, 2024
1 parent 1cf7d63 commit 5716b9a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/integrator_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,9 @@ void reb_integrator_trace_bs_step(struct reb_simulation* const r, double dt){
r->N_odes = N_odes_backup;

r->t = old_t;

// Resetting BS here reduces binary file size.
reb_integrator_bs_reset(r);
}
}

Expand Down Expand Up @@ -766,6 +769,8 @@ static void reb_integrator_trace_step(struct reb_simulation* const r){
}
reb_collision_search(r);
}
// Resetting IAS15 here reduces binary file size.
reb_integrator_ias15_reset(r);
break;
case REB_TRACE_PERI_FULL_BS:
{
Expand Down Expand Up @@ -807,6 +812,8 @@ static void reb_integrator_trace_step(struct reb_simulation* const r){
reb_collision_search(r);
}
reb_ode_free(nbody_ode);
// Resetting BS here reduces binary file size
reb_integrator_bs_reset(r);
}
break;
default:
Expand Down

0 comments on commit 5716b9a

Please sign in to comment.