From ad0a8639f2c8423f6d28454ad60556a16f3e8952 Mon Sep 17 00:00:00 2001 From: MoBit Date: Fri, 3 Dec 2021 04:32:43 +0100 Subject: [PATCH] Fixes --- src/Particle.jl | 2 +- src/animation.jl | 4 ++-- src/run.jl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Particle.jl b/src/Particle.jl index a03ffe7..be0d9d2 100644 --- a/src/Particle.jl +++ b/src/Particle.jl @@ -10,7 +10,7 @@ mutable struct Particle φ::Float64 # Angle function Particle(; id::Int64, c::Vector{Float64}, φ::Float64) - return new(id, c, zeros(2), φ) + return new(id, c, copy(c), φ) end end diff --git a/src/animation.jl b/src/animation.jl index 71a1429..7150ade 100644 --- a/src/animation.jl +++ b/src/animation.jl @@ -46,7 +46,7 @@ function animate_bundle!(args) println("Recording started!") else - if args.debug + if args.debug && frame > 1 @simd for i in 1:(args.N) first_ind = 2 * i - 1 second_ind = 2 * i @@ -69,7 +69,7 @@ function animate_bundle!(args) notify(args.circles) notify(args.colors) - if args.debug + if args.debug && frame > 1 notify(args.interaction_circles) notify(args.interaction_colors) diff --git a/src/run.jl b/src/run.jl index f2715a8..af311e2 100644 --- a/src/run.jl +++ b/src/run.jl @@ -22,7 +22,7 @@ function run_sim( sim_consts = JSON3.read(read("$dir/sim_consts.json", String)) skin_r = - 1.1 * ( + 1.5 * ( 2 * sim_consts.v * n_steps_before_verlet_list_update * sim_consts.δt + 2 * sim_consts.interaction_r )