mirror of
https://gitlab.rlp.net/mobitar/ReCo.jl.git
synced 2024-12-21 00:51:21 +00:00
Updated n_Verlet for v_0 = 0
This commit is contained in:
parent
00d2017f71
commit
bb0e68d48d
3 changed files with 9 additions and 5 deletions
|
@ -29,6 +29,8 @@ function gen_rdf_graphics()
|
|||
|
||||
particle_cs = Vector{SVector{2,Float64}}(undef, N)
|
||||
|
||||
distance_limit = 0.99 * 2 * particle_radius
|
||||
|
||||
x = y = distance = 0.0
|
||||
|
||||
for p1_ind in 1:N
|
||||
|
@ -42,9 +44,9 @@ function gen_rdf_graphics()
|
|||
|
||||
no_collision = true
|
||||
|
||||
if distance >= 0.99 * 2 * particle_radius
|
||||
if distance >= distance_limit
|
||||
for p2_ind in 1:(p1_ind - 1)
|
||||
if ReCo.norm2d(p1_c - particle_cs[p2_ind]) < 2 * particle_radius
|
||||
if ReCo.norm2d(p1_c - particle_cs[p2_ind]) < distance_limit
|
||||
no_collision = false
|
||||
|
||||
break
|
||||
|
|
|
@ -30,6 +30,8 @@ function gen_verlet_and_cell_lists_graphics()
|
|||
|
||||
particle_cs = Vector{SVector{2,Float64}}(undef, N)
|
||||
|
||||
distance_limit = 0.99 * 2 * particle_radius
|
||||
|
||||
x = y = distance = 0.0
|
||||
|
||||
for p1_ind in 1:N
|
||||
|
@ -43,9 +45,9 @@ function gen_verlet_and_cell_lists_graphics()
|
|||
|
||||
no_collision = true
|
||||
|
||||
if distance >= 0.99 * 2 * R_particle
|
||||
if distance >= distance_limit
|
||||
for p2_ind in 1:(p1_ind - 1)
|
||||
if ReCo.norm2d(p1_c - particle_cs[p2_ind]) < 2 * R_particle
|
||||
if ReCo.norm2d(p1_c - particle_cs[p2_ind]) < distance_limit
|
||||
no_collision = false
|
||||
|
||||
break
|
||||
|
|
|
@ -78,7 +78,7 @@ function gen_sim_consts(
|
|||
Int64, (skin_r - interaction_r) / max_approach_after_one_integration_step
|
||||
)
|
||||
else
|
||||
n_steps_before_verlet_list_update = 100
|
||||
n_steps_before_verlet_list_update = 1200
|
||||
end
|
||||
|
||||
grid_n = round(Int64, ceil(sqrt(n_particles)))
|
||||
|
|
Loading…
Reference in a new issue