Granular.jl

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

commit 18360a3aa9af572cc7fd542d2eab32b1b9a3f8fe
parent 6124d9ec8caee679b1b5186ee0b3cc069092ed90
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed,  6 Jun 2018 15:02:38 -0400

RM test files, improve NetCDF/JLD check. Remove pycall pre-build

Diffstat:
M.travis.yml | 4++--
Msrc/io.jl | 9++++++---
Msrc/ocean.jl | 5++++-
Mtest/wall.jl | 2+-
4 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/.travis.yml b/.travis.yml @@ -20,8 +20,8 @@ addons: - gnuplot - imagemagick -before_script: - - julia -e 'info("Preparing Python"); ENV["PYTHON"]=""; Pkg.add("PyCall"); Pkg.build("PyCall"); Pkg.add("NetCDF")' +before_script: # NetCDF is not required, but test its dependent functions anyway + - julia -e 'Pkg.add("NetCDF")' script: - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi diff --git a/src/io.jl b/src/io.jl @@ -8,9 +8,12 @@ if VERSION < v"0.7.0-alpha" import JLD hasJLD = true end -elseif haskey(Pkg.installed(), "JLD") - import JLD - hasJLD = true +else + import Pkg + if haskey(Pkg.installed(), "JLD") + import JLD + hasJLD = true + end end import Compat diff --git a/src/ocean.jl b/src/ocean.jl @@ -8,9 +8,12 @@ if VERSION < v"0.7.0-alpha" import NetCDF hasNetCDF = true end -elseif haskey(Pkg.installed(), "NetCDF") +else + import Pkg + if haskey(Pkg.installed(), "NetCDF") import NetCDF hasNetCDF = true + end end if !hasNetCDF Compat.@warn "Package NetCDF not found. " * diff --git a/test/wall.jl b/test/wall.jl @@ -445,6 +445,6 @@ Granular.addWallLinearFrictionless!(sim, [0., 1.], y_max_init, bc="normal stress", normal_stress=-100e3) Granular.setTimeStep!(sim) Granular.setTotalTime!(sim, 1.) -Granular.setOutputFileInterval!(sim, 10.) Granular.run!(sim) +Granular.removeSimulationFiles(sim) @test sim.walls[1].pos < y_max_init