tdo not allocate a new vector when initializing delta_t - Granular.jl - Julia p… | |
git clone git://src.adamsgaard.dk/Granular.jl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit b25f7f1ce64a13b748b43cac125f92d9130c0b98 | |
parent 9d82b206e18192fe95628cc69abc2984e6634cef | |
Author: Anders Damsgaard <[email protected]> | |
Date: Thu, 22 Jun 2017 19:51:32 -0400 | |
do not allocate a new vector when initializing delta_t | |
Diffstat: | |
M src/contact_search.jl | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/src/contact_search.jl b/src/contact_search.jl | |
t@@ -158,8 +158,8 @@ function checkAndAddContact!(sim::Simulation, i::Int, j::I… | |
sim.ice_floes[i].n_contacts += 1 # register new conta… | |
sim.ice_floes[j].n_contacts += 1 | |
sim.ice_floes[i].contacts[ic] = j | |
- sim.ice_floes[i].contact_parallel_displacement[ic] = | |
- zeros(2) | |
+ fill!(sim.ice_floes[i]. | |
+ contact_parallel_displacement[ic] , 0.) | |
sim.ice_floes[i].contact_age[ic] = 0. | |
break | |
end |