1
0
Fork 0
mirror of https://gitlab.rlp.net/mobitar/ReCo.jl.git synced 2024-12-21 00:51:21 +00:00
This commit is contained in:
MoBit 2021-12-03 04:32:43 +01:00
parent 59323d49cd
commit ad0a8639f2
3 changed files with 4 additions and 4 deletions

View file

@ -10,7 +10,7 @@ mutable struct Particle
φ::Float64 # Angle φ::Float64 # Angle
function Particle(; id::Int64, c::Vector{Float64}, φ::Float64) function Particle(; id::Int64, c::Vector{Float64}, φ::Float64)
return new(id, c, zeros(2), φ) return new(id, c, copy(c), φ)
end end
end end

View file

@ -46,7 +46,7 @@ function animate_bundle!(args)
println("Recording started!") println("Recording started!")
else else
if args.debug if args.debug && frame > 1
@simd for i in 1:(args.N) @simd for i in 1:(args.N)
first_ind = 2 * i - 1 first_ind = 2 * i - 1
second_ind = 2 * i second_ind = 2 * i
@ -69,7 +69,7 @@ function animate_bundle!(args)
notify(args.circles) notify(args.circles)
notify(args.colors) notify(args.colors)
if args.debug if args.debug && frame > 1
notify(args.interaction_circles) notify(args.interaction_circles)
notify(args.interaction_colors) notify(args.interaction_colors)

View file

@ -22,7 +22,7 @@ function run_sim(
sim_consts = JSON3.read(read("$dir/sim_consts.json", String)) sim_consts = JSON3.read(read("$dir/sim_consts.json", String))
skin_r = skin_r =
1.1 * ( 1.5 * (
2 * sim_consts.v * n_steps_before_verlet_list_update * sim_consts.δt + 2 * sim_consts.v * n_steps_before_verlet_list_update * sim_consts.δt +
2 * sim_consts.interaction_r 2 * sim_consts.interaction_r
) )