1
0
Fork 0
mirror of https://gitlab.rlp.net/mobitar/ReCo.jl.git synced 2024-09-17 18:51:17 +00:00

Fix: Update verlet list at start

This commit is contained in:
MoBit 2021-12-07 07:08:22 +01:00
parent 389f99221b
commit 7aa9ddd673

View file

@ -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)