Granular.jl

Julia package for granular dynamics simulation
git clone git://src.adamsgaard.dk/Granular.jl
Log | Files | Refs | README | LICENSE

commit 54d2f4f080dfd8c7c8bcc5489c9b8e23fe3e0d4b
parent d07cf4a11cda63a0d7a0b342787721cb27c02e6e
Author: Anders Damsgaard <andersd@riseup.net>
Date:   Thu,  9 Nov 2017 11:13:51 -0600

perform several changes for Julia 0.7 compatibility

Diffstat:
Mexamples/logo.jl | 2+-
Mtest/atmosphere.jl | 8++++----
Mtest/grid-boundaries.jl | 1-
Mtest/vtk.jl | 12++++++------
4 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/examples/logo.jl b/examples/logo.jl @@ -24,7 +24,7 @@ const forcing = "gyres" # o # oO' """ -logo_string = readstring(`figlet -f pebbles "$text"`) +logo_string = read(`figlet -f pebbles "$text"`, String) const dx = 1. const dy = dx diff --git a/test/atmosphere.jl b/test/atmosphere.jl @@ -13,11 +13,11 @@ sim.atmosphere = Granular.createRegularAtmosphereGrid([6, 6, 6], [1., 1., 1.]) @test size(sim.atmosphere.xh) == (6, 6) @test size(sim.atmosphere.yh) == (6, 6) @test sim.atmosphere.xq[1, :, 1] ≈ zeros(7) -@test sim.atmosphere.xq[4, :, 1] ≈ .5*ones(7) -@test sim.atmosphere.xq[end, :, 1] ≈ 1.*ones(7) +@test sim.atmosphere.xq[4, :, 1] ≈ .5 * ones(7) +@test sim.atmosphere.xq[end, :, 1] ≈ 1. * ones(7) @test sim.atmosphere.yq[:, 1, 1] ≈ zeros(7) -@test sim.atmosphere.yq[:, 4, 1] ≈ .5*ones(7) -@test sim.atmosphere.yq[:, end, 1] ≈ 1.*ones(7) +@test sim.atmosphere.yq[:, 4, 1] ≈ .5 * ones(7) +@test sim.atmosphere.yq[:, end, 1] ≈ 1. * ones(7) @test size(sim.atmosphere.u) == (7, 7, 6, 1) @test size(sim.atmosphere.v) == (7, 7, 6, 1) @test sim.atmosphere.u ≈ zeros(7, 7, 6, 1) diff --git a/test/grid-boundaries.jl b/test/grid-boundaries.jl @@ -3,7 +3,6 @@ info("#### $(basename(@__FILE__)) ####") verbose=false -i = 0 info("## Inactive/Periodic BCs") diff --git a/test/vtk.jl b/test/vtk.jl @@ -42,10 +42,10 @@ oceanchecksum = "d56ffb109841a803f2b2b94c74c87f7a497237204841d557d2b1043694d51f0d " * oceanpath * "\n" -@test readstring(`$(cmd) $(grainpath)$(cmd_post)`) == grainchecksum -@test readstring(`$(cmd) $(graininteractionpath)$(cmd_post)`) == +@test read(`$(cmd) $(grainpath)$(cmd_post)`, String) == grainchecksum +@test read(`$(cmd) $(graininteractionpath)$(cmd_post)`, String) == graininteractionchecksum -@test readstring(`$(cmd) $(oceanpath)$(cmd_post)`) == oceanchecksum +@test read(`$(cmd) $(oceanpath)$(cmd_post)`, String) == oceanchecksum Granular.removeSimulationFiles(sim) @@ -90,9 +90,9 @@ catch return_signal end end -@test readstring(`$(cmd) $(grainpath)$(cmd_post)`) == grainchecksum -@test readstring(`$(cmd) $(graininteractionpath)$(cmd_post)`) == +@test read(`$(cmd) $(grainpath)$(cmd_post)`, String) == grainchecksum +@test read(`$(cmd) $(graininteractionpath)$(cmd_post)`, String) == graininteractionchecksum -@test readstring(`$(cmd) $(oceanpath)$(cmd_post)`) == oceanchecksum +@test read(`$(cmd) $(oceanpath)$(cmd_post)`, String) == oceanchecksum Granular.removeSimulationFiles(sim)