diff --git a/src/simulation.jl b/src/simulation.jl index c66074a..1584881 100644 --- a/src/simulation.jl +++ b/src/simulation.jl @@ -95,6 +95,7 @@ function simulate( task::Union{Task,Nothing} = nothing cl = CellList(args.particles_c, args.box; parallel=false) + cl = update_verlet_list!(args, cl) start_time = now() println("Started simulation at $start_time.") @@ -102,6 +103,7 @@ function simulate( @showprogress 0.6 for (integration_step, t) in enumerate(T0:δt:T) if (integration_step % n_steps_before_snapshot == 0) && save_data wait(task) + bundle_snapshot_counter += 1 save_snapshot!(args.bundle, bundle_snapshot_counter, t, args.particles) @@ -122,6 +124,8 @@ function simulate( euler!(args) end + wait(task) + if bundle_snapshot_counter > 0 bundle = first_n_snapshots(args.bundle, bundle_snapshot_counter)