tfix indexing when adding new ice floes to the top of the domain - Granular.jl … | |
git clone git://src.adamsgaard.dk/Granular.jl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 0a7bd6d1abc511f73270af2c77a3090900105b3a | |
parent c806a097c16f733658d894ff0cfac5b1b749bb82 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Mon, 1 May 2017 13:21:49 -0400 | |
fix indexing when adding new ice floes to the top of the domain | |
Diffstat: | |
M examples/nares_strait.jl | 3 ++- | |
1 file changed, 2 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/examples/nares_strait.jl b/examples/nares_strait.jl | |
t@@ -120,7 +120,8 @@ while sim.time < sim.time_total | |
end | |
for i=1:size(sim.ocean.xh, 1) | |
if sim.ocean.ice_floe_list[i, end] == [] | |
- x, y = SeaIce.getCellCenterCoordinates(sim.ocean, i, j) | |
+ x, y = SeaIce.getCellCenterCoordinates(sim.ocean, i, | |
+ size(sim.ocean.xh, 2)) | |
x += noise_amplitude*(0.5 - Base.Random.rand()) | |
y += noise_amplitude*(0.5 - Base.Random.rand()) | |
SeaIce.addIceFloeCylindrical(sim, [x, y], r, h, verbose=false) |