tRemove Compat requirement from tests, REQUIRE, and .travis.yml - Granular.jl -… | |
git clone git://src.adamsgaard.dk/Granular.jl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 04f42947eb5779be0ef3eab670bb72953ca3d531 | |
parent ecb3a6280bc63cc6b54659dd5b516e3a7061f652 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Sun, 12 Aug 2018 10:06:38 +0200 | |
Remove Compat requirement from tests, REQUIRE, and .travis.yml | |
Diffstat: | |
M .travis.yml | 9 ++++----- | |
M Makefile | 4 ++-- | |
M REQUIRE | 2 +- | |
M src/grid.jl | 3 ++- | |
M src/io.jl | 19 +++++++++---------- | |
M src/packing.jl | 7 ++++--- | |
M test/atmosphere.jl | 10 +++++----- | |
M test/cohesion.jl | 16 ++++++++-------- | |
M test/collision-2floes-normal.jl | 76 ++++++++++++++++-------------… | |
M test/collision-2floes-oblique.jl | 134 ++++++++++++++++-------------… | |
M test/collision-5floes-normal.jl | 72 ++++++++++++++++-------------… | |
M test/compressive_failure.jl | 56 ++++++++++++++++-------------… | |
M test/contact-search-and-geometry.jl | 26 +++++++++++++------------- | |
M test/grain.jl | 24 ++++++++++++------------ | |
M test/grid-boundaries.jl | 17 ++++++++--------- | |
M test/grid.jl | 48 ++++++++++++++++-------------… | |
M test/jld.jl | 11 +++++------ | |
M test/netcdf.jl | 4 ++-- | |
M test/ocean.jl | 10 +++++----- | |
M test/packing.jl | 24 ++++++++++++------------ | |
M test/profiling.jl | 13 ++++++------- | |
M test/runtests.jl | 7 +++---- | |
M test/temporal.jl | 2 +- | |
M test/util.jl | 10 +++++----- | |
M test/vtk.jl | 21 ++++++++++----------- | |
M test/wall.jl | 66 ++++++++++++++++-------------… | |
26 files changed, 343 insertions(+), 348 deletions(-) | |
--- | |
diff --git a/.travis.yml b/.travis.yml | |
t@@ -6,8 +6,7 @@ os: | |
- osx | |
julia: | |
- - 0.6 | |
- - 0.7 | |
+ - 1.0 | |
- nightly | |
notifications: | |
t@@ -22,15 +21,15 @@ addons: | |
- imagemagick | |
before_script: # NetCDF is not required, but test its dependent functions any… | |
- - julia -e 'VERSION <= v"0.6.99" && (Pkg.add("NetCDF"); Pkg.build("NetCDF"))' | |
+ - julia -e 'VERSION >= v"0.7" && (import Pkg; Pkg.add("NetCDF"); Pkg.build("… | |
script: | |
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi | |
- - julia -e 'Pkg.clone(pwd()); Pkg.build("Granular"); Pkg.test("Granular"; co… | |
+ - julia -e 'import Pkg; Pkg.clone(pwd()); Pkg.build("Granular"); Pkg.test("G… | |
deploy: | |
- provider: script | |
- script: julia -e 'cd(Pkg.dir("Granular")); Pkg.add("Coverage"); Pkg.add("D… | |
+ script: julia -e 'import Pkg; cd(Pkg.dir("Granular")); Pkg.add("Coverage")… | |
on: | |
os: linux | |
julia: 0.6 | |
diff --git a/Makefile b/Makefile | |
t@@ -1,12 +1,12 @@ | |
default: test | |
.PHONY: test | |
-test: test-julia-0.6 test-julia-1.0 | |
+test: test-julia-1.0 #test-julia-0.6 | |
.PHONY: test-julia-0.6 | |
test-julia-0.6: | |
@#julia --color=yes -e 'Pkg.test("Granular")' | |
- julia --color=yes -e 'Pkg.test("Granular")' \ | |
+ julia-0.6 --color=yes -e 'Pkg.test("Granular")' \ | |
&& notify-send Granular.jl tests completed successfully on Jul… | |
|| notify-send Granular.jl failed on Julia 0.6 | |
diff --git a/REQUIRE b/REQUIRE | |
t@@ -1,4 +1,4 @@ | |
-julia 0.6 | |
+julia 1.0 | |
WriteVTK | |
Documenter | |
Compat 0.63.0 | |
diff --git a/src/grid.jl b/src/grid.jl | |
t@@ -1,3 +1,4 @@ | |
+import Random | |
using Compat | |
using Compat.LinearAlgebra | |
using Compat.Random | |
t@@ -588,7 +589,7 @@ function findEmptyPositionInGridCell(simulation::Simulatio… | |
for i_iter=1:n_iter | |
overlap_found = false | |
- srand(i*j*seed*i_iter) | |
+ Random.seed!(i*j*seed*i_iter) | |
# generate random candidate position | |
x_tilde = rand() | |
y_tilde = rand() | |
diff --git a/src/io.jl b/src/io.jl | |
t@@ -1,6 +1,9 @@ | |
import WriteVTK | |
import Compat | |
using Compat.LinearAlgebra | |
+using Compat.DelimitedFiles | |
+using Compat.Dates | |
+ | |
hasJLD = false | |
if VERSION < v"0.7.0-alpha" | |
t@@ -16,10 +19,6 @@ else | |
end | |
end | |
-import Compat | |
-using Compat.DelimitedFiles | |
-using Compat.Dates | |
- | |
## IO functions | |
export writeSimulation | |
t@@ -250,7 +249,7 @@ function status(folder::String="."; | |
if Compat.Sys.iswindows() | |
cols = 80 | |
else | |
- cols = parse(Int, readstring(`tput cols`)) | |
+ cols = parse(Int, read(`tput cols`, String)) | |
end | |
if write_header | |
for i=1:cols | |
t@@ -289,14 +288,14 @@ function status(folder::String="."; | |
for i=length(id):cols-right_fields_width | |
print(' ') | |
end | |
- if data[1] < 60. # secs | |
+ if data[1] < 60.0 # secs | |
time = @sprintf "%6.2fs" data[1] | |
- elseif data[1] < 60.*60. # mins | |
+ elseif data[1] < 60.0*60.0 # mins | |
time = @sprintf "%6.2fm" data[1]/60. | |
- elseif data[1] < 60.*60.*24. # hours | |
- time = @sprintf "%6.2fh" data[1]/(60. * 60.) | |
+ elseif data[1] < 60.0*60.0*24.0 # hours | |
+ time = @sprintf "%6.2fh" data[1]/(60.0 * 60.0) | |
else # days | |
- time = @sprintf "%6.2fd" data[1]/(60. * 60. * 24.) | |
+ time = @sprintf "%6.2fd" data[1]/(60.0 * 60.0 * 24.0) | |
end | |
Compat.printstyled("$time", color=time_color) | |
Compat.printstyled("$percentage", color=percentage_color) | |
diff --git a/src/packing.jl b/src/packing.jl | |
t@@ -1,5 +1,6 @@ | |
## Functions for creating grain packings | |
import Compat | |
+import Random | |
using Compat.LinearAlgebra | |
using Compat.Random | |
t@@ -45,7 +46,7 @@ function regularPacking!(simulation::Simulation, | |
r_rand = 0. | |
pos = zeros(2) | |
h = .5 # disc tickness | |
- srand(seed) | |
+ Random.seed!(seed) | |
if tiling == "square" | |
dx = r_max * 2. * (1. + padding_factor) # cell size | |
t@@ -179,7 +180,7 @@ function irregularPacking!(simulation::Simulation; | |
seed::Integer=1, | |
plot_during_packing::Bool=false, | |
verbose::Bool=true) | |
- srand(seed) | |
+ Random.seed!(seed) | |
active_list = Int[] # list of points to originate search from | |
i = 0 | |
t@@ -372,7 +373,7 @@ function rasterPacking!(sim::Simulation, | |
h = .5 # disc tickness | |
dx = r_max * 2. * (1. + padding_factor) # cell size | |
dx_padding = r_max * 2. * padding_factor | |
- srand(seed) | |
+ Random.seed!(seed) | |
np_init = length(sim.grains) | |
diff --git a/test/atmosphere.jl b/test/atmosphere.jl | |
t@@ -3,7 +3,7 @@ | |
# Check if atmosphere-specific functions and grid operations are functioning | |
# correctly | |
-Compat.@info "Testing regular grid generation" | |
+@info "Testing regular grid generation" | |
sim = Granular.createSimulation() | |
sim.atmosphere = Granular.createRegularAtmosphereGrid([6, 6, 6], [1., 1., 1.]) | |
@test size(sim.atmosphere.xq) == (7, 7) | |
t@@ -21,7 +21,7 @@ sim.atmosphere = Granular.createRegularAtmosphereGrid([6, 6,… | |
@test sim.atmosphere.u ≈ zeros(7, 7, 6, 1) | |
@test sim.atmosphere.v ≈ zeros(7, 7, 6, 1) | |
-Compat.@info "Testing velocity drag interaction (static atmosphere)" | |
+@info "Testing velocity drag interaction (static atmosphere)" | |
Granular.addGrainCylindrical!(sim, [.5, .5], .25, .1) | |
Granular.setTotalTime!(sim, 5.) | |
Granular.setTimeStep!(sim) | |
t@@ -37,7 +37,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEnergy… | |
@test sim.grains[1].atmosphere_stress[1] < 0. | |
@test sim.grains[1].atmosphere_stress[2] ≈ 0. | |
-Compat.@info "Testing velocity drag interaction (static ice floe)" | |
+@info "Testing velocity drag interaction (static ice floe)" | |
sim = deepcopy(sim_init) | |
sim.atmosphere.v[:, :, 1, 1] .= 0.1 | |
E_kin_lin_init = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -50,7 +50,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEnergy… | |
@test sim.grains[1].atmosphere_stress[1] ≈ 0. | |
@test sim.grains[1].atmosphere_stress[2] > 0. | |
-Compat.@info "Testing vortex interaction (static atmosphere)" | |
+@info "Testing vortex interaction (static atmosphere)" | |
sim = deepcopy(sim_init) | |
sim.grains[1].ang_vel[3] = 0.1 | |
E_kin_lin_init = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -63,7 +63,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEnergy… | |
@test sim.grains[1].ang_pos[3] > 0. # check angular position orientation | |
@test E_kin_lin_init ≈ E_kin_lin_final # no linear velocity gained | |
-Compat.@info "Testing vortex interaction (static ice floe)" | |
+@info "Testing vortex interaction (static ice floe)" | |
sim = deepcopy(sim_init) | |
sim.atmosphere = Granular.createRegularAtmosphereGrid([1, 1, 1], [1., 1., 1.]) | |
sim.grains[1].lin_pos[1] = 0.5 | |
diff --git a/test/cohesion.jl b/test/cohesion.jl | |
t@@ -1,5 +1,5 @@ | |
#!/usr/bin/env julia | |
-using Compat.Test | |
+using Test | |
import Granular | |
# Check for conservation of kinetic energy (=momentum) during a normal collisi… | |
t@@ -14,7 +14,7 @@ sim_init.grains[1].youngs_modulus = 1e-5 # repulsion is neg… | |
sim_init.grains[2].youngs_modulus = 1e-5 # repulsion is negligible | |
Granular.setTimeStep!(sim_init, verbose=verbose) | |
-Compat.@info "# Check contact age scheme" | |
+@info "# Check contact age scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTotalTime!(sim, 10.) | |
sim.time_step = 1. | |
t@@ -22,7 +22,7 @@ Granular.run!(sim, verbose=verbose) | |
Granular.removeSimulationFiles(sim) | |
@test sim.grains[1].contact_age[1] ≈ sim.time | |
-Compat.@info "# Check if bonds add tensile strength" | |
+@info "# Check if bonds add tensile strength" | |
sim = Granular.createSimulation(id="cohesion") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10., 1., tensile_strength=500e3) | |
Granular.addGrainCylindrical!(sim, [20.1, 0.], 10., 1., tensile_strength=500e3) | |
t@@ -38,7 +38,7 @@ Granular.removeSimulationFiles(sim) | |
@test sim.grains[1].ang_vel ≈ zeros(3) | |
@test sim.grains[2].ang_vel ≈ zeros(3) | |
-Compat.@info "# Add shear strength and test bending resistance (one grain rota… | |
+@info "# Add shear strength and test bending resistance (one grain rotating)" | |
sim = Granular.createSimulation(id="cohesion") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10.1, 1., tensile_strength=500e3, | |
shear_strength=500e3) | |
t@@ -66,7 +66,7 @@ E_therm_final = Granular.totalGrainThermalEnergy(sim) | |
@test E_kin_lin_init ≈ E_kin_lin_final | |
@test E_kin_rot_init > E_kin_rot_final + E_therm_final | |
-Compat.@info "# Add shear strength and test bending resistance (one grain rota… | |
+@info "# Add shear strength and test bending resistance (one grain rotating)" | |
sim = Granular.createSimulation(id="cohesion") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10.1, 1., tensile_strength=500e3, | |
shear_strength=500e3) | |
t@@ -94,7 +94,7 @@ E_therm_final = Granular.totalGrainThermalEnergy(sim) | |
@test E_kin_lin_init ≈ E_kin_lin_final | |
@test E_kin_rot_init > E_kin_rot_final + E_therm_final | |
-Compat.@info "# Add shear strength and test bending resistance (both grains ro… | |
+@info "# Add shear strength and test bending resistance (both grains rotating)" | |
sim = Granular.createSimulation(id="cohesion") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10.0000001, 1., tensile_strength=… | |
shear_strength=500e3) | |
t@@ -123,7 +123,7 @@ E_therm_final = Granular.totalGrainThermalEnergy(sim) | |
@test E_kin_lin_init ≈ E_kin_lin_final | |
@test E_kin_rot_init > E_kin_rot_final + E_therm_final | |
-Compat.@info "# Break bond through bending I" | |
+@info "# Break bond through bending I" | |
sim = Granular.createSimulation(id="cohesion") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10.0000001, 1., tensile_strength=… | |
shear_strength=500e3) | |
t@@ -153,7 +153,7 @@ E_therm_final = Granular.totalGrainThermalEnergy(sim) | |
@test sim.grains[1].n_contacts == 0 | |
@test sim.grains[2].n_contacts == 0 | |
-Compat.@info "# Break bond through bending II" | |
+@info "# Break bond through bending II" | |
sim = Granular.createSimulation(id="cohesion") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10.1, 1., tensile_strength=500e3, | |
shear_strength=50e3) | |
diff --git a/test/collision-2floes-normal.jl b/test/collision-2floes-normal.jl | |
t@@ -5,7 +5,7 @@ | |
verbose=false | |
-Compat.@info "# One ice floe fixed" | |
+@info "# One ice floe fixed" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10., 1., verbose=verbose) | |
Granular.addGrainCylindrical!(sim, [20.05, 0.], 10., 1., verbose=verbose) | |
t@@ -21,10 +21,10 @@ E_kin_rot_init = Granular.totalGrainKineticRotationalEnerg… | |
Granular.setTotalTime!(sim, 10.0) | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.2 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", verbose=verb… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -33,11 +33,11 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.02 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", verbose=verb… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -46,11 +46,11 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.01 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
t@@ -60,7 +60,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEnergy… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "# Ice floes free to move" | |
+@info "# Ice floes free to move" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10., 1., verbose=verbose) | |
t@@ -76,10 +76,10 @@ E_kin_rot_init = Granular.totalGrainKineticRotationalEnerg… | |
Granular.setTotalTime!(sim, 10.0) | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.2 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", verbose=verb… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -88,11 +88,11 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.02 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", verbose=verb… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -101,11 +101,11 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.01 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
t@@ -115,8 +115,8 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "# Adding contact-normal viscosity" | |
-Compat.@info "# One ice floe fixed" | |
+@info "# Adding contact-normal viscosity" | |
+@info "# One ice floe fixed" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10., 1., verbose=verbose) | |
Granular.addGrainCylindrical!(sim, [20.05, 0.], 10., 1., verbose=verbose) | |
t@@ -135,11 +135,11 @@ Granular.setTotalTime!(sim, 10.0) | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.02 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", verbose=verb… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -148,11 +148,11 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.01 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
t@@ -162,7 +162,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "# Ice floes free to move" | |
+@info "# Ice floes free to move" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10., 1., verbose=verbose) | |
t@@ -180,11 +180,11 @@ E_kin_rot_init = Granular.totalGrainKineticRotationalEne… | |
Granular.setTotalTime!(sim, 10.0) | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.02 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", verbose=verb… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -193,11 +193,11 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.01 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
t@@ -207,7 +207,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "# Testing allow_*_acc for fixed grains" | |
+@info "# Testing allow_*_acc for fixed grains" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10., 1., verbose=verbose) | |
Granular.addGrainCylindrical!(sim, [20.05, 0.], 10., 1., verbose=verbose) | |
t@@ -223,7 +223,7 @@ Granular.setTimeStep!(sim, epsilon=0.07) | |
sim_init = deepcopy(sim) | |
sim.grains[2].allow_y_acc = true # should not influence result | |
-Compat.@info "Two-term Taylor scheme: allow_y_acc" | |
+@info "Two-term Taylor scheme: allow_y_acc" | |
sim = deepcopy(sim_init) | |
sim.grains[2].allow_y_acc = true # should not influence result | |
tol = 0.2 | |
t@@ -235,7 +235,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
@test sim.grains[2].lin_pos ≈ grain2_pos_init | |
-Compat.@info "Two-term Taylor scheme: allow_x_acc" | |
+@info "Two-term Taylor scheme: allow_x_acc" | |
sim = deepcopy(sim_init) | |
sim.grains[2].allow_x_acc = true # should influence result | |
tol = 0.2 | |
t@@ -247,7 +247,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
@test sim.grains[2].lin_pos[1] > grain2_pos_init[1] | |
-Compat.@info "Three-term Taylor scheme: allow_y_acc" | |
+@info "Three-term Taylor scheme: allow_y_acc" | |
sim = deepcopy(sim_init) | |
tol = 0.02 | |
sim.grains[2].allow_y_acc = true # should influence result | |
t@@ -259,7 +259,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
@test sim.grains[2].lin_pos ≈ grain2_pos_init | |
-Compat.@info "Three-term Taylor scheme: allow_x_acc" | |
+@info "Three-term Taylor scheme: allow_x_acc" | |
sim = deepcopy(sim_init) | |
tol = 0.02 | |
sim.grains[2].allow_x_acc = true # should influence result | |
t@@ -272,18 +272,18 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test sim.grains[2].lin_pos[1] > grain2_pos_init[1] | |
#= | |
-Compat.@info "# Test stability under collision with fixed particles different … | |
+@info "# Test stability under collision with fixed particles different allow_*… | |
r = 10. | |
i = 1 | |
for tensile_strength in [0.0, 200e3] | |
- for angle in Compat.range(0, 2π, 7) | |
+ for angle in range(0, 2π, 7) | |
for allow_x_acc in [false, true] | |
for allow_y_acc in [false, true] | |
- Compat.@info "Test $i" | |
- Compat.@info "Contact angle: $angle rad" | |
- Compat.@info "allow_x_acc = $allow_x_acc" | |
- Compat.@info "allow_y_acc = $allow_y_acc" | |
- Compat.@info "tensile_strength = $tensile_strength Pa" | |
+ @info "Test $i" | |
+ @info "Contact angle: $angle rad" | |
+ @info "allow_x_acc = $allow_x_acc" | |
+ @info "allow_y_acc = $allow_y_acc" | |
+ @info "tensile_strength = $tensile_strength Pa" | |
sim = Granular.createSimulation() | |
sim.id = "test-$i-$allow_x_acc-$allow_y_acc-C=$tensile_strengt… | |
t@@ -312,7 +312,7 @@ for tensile_strength in [0.0, 200e3] | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
sim_init = deepcopy(sim) | |
- Compat.@info "TY3" | |
+ @info "TY3" | |
sim = deepcopy(sim_init) | |
tol = 0.02 | |
Granular.setOutputFileInterval!(sim, 1.0) | |
diff --git a/test/collision-2floes-oblique.jl b/test/collision-2floes-oblique.jl | |
t@@ -5,8 +5,8 @@ | |
verbose=false | |
-Compat.@info "## Contact-normal elasticity only" | |
-Compat.@info "# One ice floe fixed" | |
+@info "## Contact-normal elasticity only" | |
+@info "# One ice floe fixed" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 10.], 10., 1., verbose=verbose) | |
Granular.addGrainCylindrical!(sim, [19., 0.], 10., 1., verbose=verbose) | |
t@@ -25,10 +25,10 @@ Granular.setTotalTime!(sim, 30.0) | |
#sim.file_time_step = 1. | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.1 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", verbose=verb… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -38,11 +38,11 @@ E_thermal_final = Granular.totalGrainThermalEnergy(sim) | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.01 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", verbose=verb… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -52,11 +52,11 @@ E_thermal_final = Granular.totalGrainThermalEnergy(sim) | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.01 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", verbose=ve… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -65,7 +65,7 @@ E_thermal_final = Granular.totalGrainThermalEnergy(sim) | |
@test E_kin_lin_init ≈ E_kin_lin_final+E_thermal_final atol=E_kin_lin_init*t… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "# Ice floes free to move" | |
+@info "# Ice floes free to move" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 10.], 10., 1., verbose=verbose) | |
t@@ -83,10 +83,10 @@ E_kin_rot_init = Granular.totalGrainKineticRotationalEnerg… | |
Granular.setTotalTime!(sim, 30.0) | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.1 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", verbose=verb… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -95,11 +95,11 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.01 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", verbose=verb… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -108,11 +108,11 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.01 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
t@@ -122,7 +122,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "## Contact-normal elasticity and tangential viscosity and fricti… | |
+@info "## Contact-normal elasticity and tangential viscosity and friction" | |
Granular.setTotalTime!(sim, 30.0) | |
sim_init.grains[1].contact_viscosity_tangential = 1e6 | |
sim_init.grains[2].contact_viscosity_tangential = 1e6 | |
t@@ -132,10 +132,10 @@ sim_init.grains[2].fixed = true | |
sim = deepcopy(sim_init) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.1 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.setOutputFileInterval!(sim, 1.0) | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", | |
verbose=verbose) | |
t@@ -152,12 +152,12 @@ println(E_kin_rot_init) | |
println(E_kin_rot_final) | |
@test E_kin_lin_init+E_kin_rot_init ≈ E_kin_lin_final+E_kin_rot_final atol=E… | |
-Compat.@info "mu_d = 0." | |
+@info "mu_d = 0." | |
sim = deepcopy(sim_init) | |
sim.grains[1].contact_dynamic_friction = 0. | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.01 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
E_kin_lin_init = Granular.totalGrainKineticTranslationalEnergy(sim) | |
E_kin_rot_init = Granular.totalGrainKineticRotationalEnergy(sim) | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
t@@ -171,11 +171,11 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test E_kin_lin_init ≈ E_kin_lin_final atol=E_kin_lin_init*tol | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.1 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", | |
verbose=verbose) | |
t@@ -188,11 +188,11 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test E_kin_lin_init+E_kin_rot_init ≈ E_kin_lin_final+E_kin_rot_final atol=E… | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.09 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
t@@ -204,7 +204,7 @@ E_kin_lin_final = Granular.totalGrainKineticTranslationalE… | |
E_kin_rot_final = Granular.totalGrainKineticRotationalEnergy(sim) | |
@test E_kin_lin_init+E_kin_rot_init ≈ E_kin_lin_final+E_kin_rot_final atol=E… | |
-Compat.@info "# Ice floes free to move" | |
+@info "# Ice floes free to move" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 10.], 10., 1., verbose=verbose) | |
t@@ -222,10 +222,10 @@ E_kin_rot_init = Granular.totalGrainKineticRotationalEne… | |
Granular.setTotalTime!(sim, 30.0) | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.1 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", | |
verbose=verbose) | |
t@@ -237,11 +237,11 @@ E_kin_lin_final = Granular.totalGrainKineticTranslationa… | |
E_kin_rot_final = Granular.totalGrainKineticRotationalEnergy(sim) | |
@test E_kin_lin_init+E_kin_rot_init ≈ E_kin_lin_final+E_kin_rot_final atol=E… | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.04 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", | |
verbose=verbose) | |
t@@ -250,11 +250,11 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test E_kin_lin_init+E_kin_rot_init ≈ E_kin_lin_final+E_kin_rot_final atol=E… | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.04 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
t@@ -267,7 +267,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_lin_init+E_kin_rot_init ≈ E_kin_lin_final+E_kin_rot_final atol=E… | |
-Compat.@info "# Ice floes free to move, mirrored" | |
+@info "# Ice floes free to move, mirrored" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10., 1., verbose=verbose) | |
t@@ -285,10 +285,10 @@ E_kin_rot_init = Granular.totalGrainKineticRotationalEne… | |
Granular.setTotalTime!(sim, 30.0) | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.1 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", | |
verbose=verbose) | |
t@@ -300,11 +300,11 @@ E_kin_lin_final = Granular.totalGrainKineticTranslationa… | |
E_kin_rot_final = Granular.totalGrainKineticRotationalEnergy(sim) | |
@test E_kin_lin_init+E_kin_rot_init ≈ E_kin_lin_final+E_kin_rot_final atol=E… | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.04 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", | |
verbose=verbose) | |
t@@ -313,11 +313,11 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test E_kin_lin_init+E_kin_rot_init ≈ E_kin_lin_final+E_kin_rot_final atol=E… | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.04 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
t@@ -330,7 +330,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_lin_init+E_kin_rot_init ≈ E_kin_lin_final+E_kin_rot_final atol=E… | |
-Compat.@info "# Ice floes free to move, mirrored #2" | |
+@info "# Ice floes free to move, mirrored #2" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10., 1., verbose=verbose) | |
t@@ -346,10 +346,10 @@ E_kin_rot_init = Granular.totalGrainKineticRotationalEne… | |
Granular.setTotalTime!(sim, 30.0) | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.1 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", | |
verbose=verbose) | |
t@@ -361,11 +361,11 @@ E_kin_lin_final = Granular.totalGrainKineticTranslationa… | |
E_kin_rot_final = Granular.totalGrainKineticRotationalEnergy(sim) | |
@test E_kin_lin_init+E_kin_rot_init ≈ E_kin_lin_final+E_kin_rot_final atol=E… | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.04 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", | |
verbose=verbose) | |
t@@ -374,11 +374,11 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test E_kin_lin_init+E_kin_rot_init ≈ E_kin_lin_final+E_kin_rot_final atol=E… | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.04 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
t@@ -391,7 +391,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_lin_init+E_kin_rot_init ≈ E_kin_lin_final+E_kin_rot_final atol=E… | |
-Compat.@info "# Tangential elasticity, no tangential viscosity, no Coulomb sli… | |
+@info "# Tangential elasticity, no tangential viscosity, no Coulomb slip" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10., 1., verbose=verbose) | |
t@@ -415,10 +415,10 @@ E_kin_rot_init = Granular.totalGrainKineticRotationalEne… | |
Granular.setTotalTime!(sim, 30.0) | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.1 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", | |
verbose=verbose) | |
t@@ -430,11 +430,11 @@ E_kin_lin_final = Granular.totalGrainKineticTranslationa… | |
E_kin_rot_final = Granular.totalGrainKineticRotationalEnergy(sim) | |
@test E_kin_lin_init+E_kin_rot_init ≈ E_kin_lin_final+E_kin_rot_final atol=E… | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.04 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", | |
verbose=verbose) | |
t@@ -443,11 +443,11 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test E_kin_lin_init+E_kin_rot_init ≈ E_kin_lin_final+E_kin_rot_final atol=E… | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.04 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
t@@ -460,7 +460,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_lin_init+E_kin_rot_init ≈ E_kin_lin_final+E_kin_rot_final atol=E… | |
-Compat.@info "# Tangential elasticity, no tangential viscosity, Coulomb slip" | |
+@info "# Tangential elasticity, no tangential viscosity, Coulomb slip" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10., 1., verbose=verbose) | |
t@@ -484,11 +484,11 @@ E_kin_rot_init = Granular.totalGrainKineticRotationalEne… | |
Granular.setTotalTime!(sim, 30.0) | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.02 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", | |
verbose=verbose) | |
t@@ -496,11 +496,11 @@ E_kin_lin_final = Granular.totalGrainKineticTranslationa… | |
E_kin_rot_final = Granular.totalGrainKineticRotationalEnergy(sim) | |
@test E_kin_lin_init+E_kin_rot_init > E_kin_lin_final+E_kin_rot_final | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.03 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
t@@ -513,7 +513,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_lin_init+E_kin_rot_init > E_kin_lin_final+E_kin_rot_final | |
-Compat.@info "# Tangential elasticity, tangential viscosity, no Coulomb slip" | |
+@info "# Tangential elasticity, tangential viscosity, no Coulomb slip" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10., 1., verbose=verbose) | |
t@@ -537,11 +537,11 @@ E_kin_rot_init = Granular.totalGrainKineticRotationalEne… | |
Granular.setTotalTime!(sim, 30.0) | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.02 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", | |
verbose=verbose) | |
t@@ -549,11 +549,11 @@ E_kin_lin_final = Granular.totalGrainKineticTranslationa… | |
E_kin_rot_final = Granular.totalGrainKineticRotationalEnergy(sim) | |
@test E_kin_lin_init+E_kin_rot_init > E_kin_lin_final+E_kin_rot_final | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.03 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
t@@ -566,7 +566,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_lin_init+E_kin_rot_init > E_kin_lin_final+E_kin_rot_final | |
-Compat.@info "# Tangential elasticity, tangential viscosity, Coulomb slip" | |
+@info "# Tangential elasticity, tangential viscosity, Coulomb slip" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10., 1., verbose=verbose) | |
t@@ -590,11 +590,11 @@ E_kin_rot_init = Granular.totalGrainKineticRotationalEne… | |
Granular.setTotalTime!(sim, 30.0) | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.02 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", | |
verbose=verbose) | |
t@@ -602,11 +602,11 @@ E_kin_lin_final = Granular.totalGrainKineticTranslationa… | |
E_kin_rot_final = Granular.totalGrainKineticRotationalEnergy(sim) | |
@test E_kin_lin_init+E_kin_rot_init > E_kin_lin_final+E_kin_rot_final | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.03 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
diff --git a/test/collision-5floes-normal.jl b/test/collision-5floes-normal.jl | |
t@@ -1,12 +1,12 @@ | |
#!/usr/bin/env julia | |
-using Compat.LinearAlgebra | |
+using LinearAlgebra | |
# Check for conservation of kinetic energy (=momentum) during a normal collisi… | |
# between two ice cylindrical grains | |
verbose=false | |
-Compat.@info "# One ice floe fixed" | |
+@info "# One ice floe fixed" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10., 1., verbose=verbose) | |
Granular.addGrainCylindrical!(sim, [20.05, 0.], 10., 1., verbose=verbose) | |
t@@ -28,10 +28,10 @@ E_kin_rot_init = Granular.totalGrainKineticRotationalEnerg… | |
Granular.setTotalTime!(sim, 10.0) | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.2 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", verbose=verb… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -40,16 +40,16 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
@test 0. < norm(sim.grains[1].lin_vel) | |
for i=2:5 | |
- Compat.@info "testing ice floe $i" | |
+ @info "testing ice floe $i" | |
@test 0. ≈ norm(sim.grains[i].lin_vel) | |
end | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.02 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", verbose=verb… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -58,16 +58,16 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
@test 0. < norm(sim.grains[1].lin_vel) | |
for i=2:5 | |
- Compat.@info "testing ice floe $i" | |
+ @info "testing ice floe $i" | |
@test 0. ≈ norm(sim.grains[i].lin_vel) | |
end | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.01 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
t@@ -77,12 +77,12 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
@test 0. < norm(sim.grains[1].lin_vel) | |
for i=2:5 | |
- Compat.@info "testing ice floe $i" | |
+ @info "testing ice floe $i" | |
@test 0. ≈ norm(sim.grains[i].lin_vel) | |
end | |
-Compat.@info "# Ice floes free to move" | |
+@info "# Ice floes free to move" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10., 1., verbose=verbose) | |
t@@ -101,10 +101,10 @@ E_kin_rot_init = Granular.totalGrainKineticRotationalEne… | |
Granular.setTotalTime!(sim, 40.0) | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.2 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", verbose=verb… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -112,16 +112,16 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test E_kin_lin_init ≈ E_kin_lin_final atol=E_kin_lin_init*tol | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
for i=1:5 | |
- Compat.@info "testing ice floe $i" | |
+ @info "testing ice floe $i" | |
@test 0. < norm(sim.grains[i].lin_vel) | |
end | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.02 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", verbose=verb… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -129,16 +129,16 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test E_kin_lin_init ≈ E_kin_lin_final atol=E_kin_lin_init*tol | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
for i=1:5 | |
- Compat.@info "testing ice floe $i" | |
+ @info "testing ice floe $i" | |
@test 0. < norm(sim.grains[i].lin_vel) | |
end | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.01 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
t@@ -147,13 +147,13 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test E_kin_lin_init ≈ E_kin_lin_final atol=E_kin_lin_init*tol | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
for i=1:5 | |
- Compat.@info "testing ice floe $i" | |
+ @info "testing ice floe $i" | |
@test 0. < norm(sim.grains[i].lin_vel) | |
end | |
-Compat.@info "# Adding contact-normal viscosity" | |
-Compat.@info "# One ice floe fixed" | |
+@info "# Adding contact-normal viscosity" | |
+@info "# One ice floe fixed" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10., 1., verbose=verbose) | |
Granular.addGrainCylindrical!(sim, [20.05, 0.], 10., 1., verbose=verbose) | |
t@@ -181,11 +181,11 @@ Granular.setTotalTime!(sim, 10.0) | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.02 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", verbose=verb… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -194,16 +194,16 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
@test 0. < norm(sim.grains[1].lin_vel) | |
for i=2:5 | |
- Compat.@info "testing ice floe $i" | |
+ @info "testing ice floe $i" | |
@test 0. ≈ norm(sim.grains[i].lin_vel) | |
end | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.01 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
t@@ -213,12 +213,12 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
@test 0. < norm(sim.grains[1].lin_vel) | |
for i=2:5 | |
- Compat.@info "testing ice floe $i" | |
+ @info "testing ice floe $i" | |
@test 0. ≈ norm(sim.grains[i].lin_vel) | |
end | |
-Compat.@info "# Ice floes free to move" | |
+@info "# Ice floes free to move" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [0., 0.], 10., 1., verbose=verbose) | |
t@@ -242,11 +242,11 @@ E_kin_rot_init = Granular.totalGrainKineticRotationalEne… | |
Granular.setTotalTime!(sim, 10.0) | |
sim_init = deepcopy(sim) | |
-Compat.@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
+@info "Testing kinetic energy conservation with Two-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.007) | |
tol = 0.02 | |
-Compat.@info "Relative tolerance: $(tol*100.)%" | |
+@info "Relative tolerance: $(tol*100.)%" | |
Granular.run!(sim, temporal_integration_method="Two-term Taylor", verbose=verb… | |
E_kin_lin_final = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -254,16 +254,16 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEn… | |
@test E_kin_lin_init > E_kin_lin_final | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
for i=1:5 | |
- Compat.@info "testing ice floe $i" | |
+ @info "testing ice floe $i" | |
@test 0. < norm(sim.grains[i].lin_vel) | |
end | |
-Compat.@info "Testing kinetic energy conservation with Three-term Taylor schem… | |
+@info "Testing kinetic energy conservation with Three-term Taylor scheme" | |
sim = deepcopy(sim_init) | |
Granular.setTimeStep!(sim, epsilon=0.07) | |
tol = 0.01 | |
-Compat.@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step… | |
+@info "Relative tolerance: $(tol*100.)% with time step: $(sim.time_step)" | |
Granular.run!(sim, temporal_integration_method="Three-term Taylor", | |
verbose=verbose) | |
t@@ -272,6 +272,6 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEner… | |
@test E_kin_lin_init > E_kin_lin_final | |
@test E_kin_rot_init ≈ E_kin_rot_final | |
for i=1:5 | |
- Compat.@info "testing ice floe $i" | |
+ @info "testing ice floe $i" | |
@test 0. < norm(sim.grains[i].lin_vel) | |
end | |
diff --git a/test/compressive_failure.jl b/test/compressive_failure.jl | |
t@@ -1,5 +1,5 @@ | |
#!/usr/bin/env julia | |
-using Compat.Test | |
+using Test | |
import Granular | |
verbose = false | |
t@@ -49,12 +49,12 @@ function plot_interaction(sim::Granular.Simulation, output… | |
PyPlot.savefig(output) | |
end | |
-Compat.@info "Testing compressive failure: uniaxial compression" | |
+@info "Testing compressive failure: uniaxial compression" | |
sim = Granular.createSimulation("compressive_failure_uniaxial") | |
-Granular.addGrainCylindrical!(sim, [0.,0.], 1., 0.5, | |
+Granular.addGrainCylindrical!(sim, [0.0,0.0], 1.0, 0.5, | |
fracture_toughness=1285e3, | |
- lin_vel=[1., 0.], fixed=true, verbose=verbose) | |
-Granular.addGrainCylindrical!(sim, [2.,0.], 1., 0.5, | |
+ lin_vel=[1.0, 0.0], fixed=true, verbose=verbose) | |
+Granular.addGrainCylindrical!(sim, [2.0,0.0], 1.0, 0.5, | |
fracture_toughness=1285e3, | |
fixed=true, verbose=verbose) | |
@test count(x->x==true, sim.grains[1].compressive_failure) == 0 | |
t@@ -78,12 +78,12 @@ end | |
@test sim.grains[1].torque ≈ zeros(3) | |
@test sim.grains[2].torque ≈ zeros(3) | |
-Compat.@info "Testing compressive failure: shear" | |
+@info "Testing compressive failure: shear" | |
sim = Granular.createSimulation("compressive_failure_shear") | |
-Granular.addGrainCylindrical!(sim, [0.,0.], 1., 0.5, | |
+Granular.addGrainCylindrical!(sim, [0.0,0.0], 1.0, 0.5, | |
fracture_toughness=1285e3, | |
- lin_vel=[0., 1.], fixed=true, verbose=verbose) | |
-Granular.addGrainCylindrical!(sim, [1.5,1.5], 1., 0.5, | |
+ lin_vel=[0.0, 1.0], fixed=true, verbose=verbose) | |
+Granular.addGrainCylindrical!(sim, [1.5,1.5], 1.0, 0.5, | |
fracture_toughness=1285e3, | |
fixed=true, verbose=verbose) | |
@test count(x->x==true, sim.grains[1].compressive_failure) == 0 | |
t@@ -111,12 +111,12 @@ end | |
@test sim.grains[2].torque[1:2] ≈ zeros(2) | |
@test sim.grains[2].torque[3] < 0.0 | |
-Compat.@info "Testing robustness of overlap calculations" | |
+@info "Testing robustness of overlap calculations" | |
sim = Granular.createSimulation("overlap") | |
-Granular.addGrainCylindrical!(sim, [0.,0.], 1., 0.5, | |
+Granular.addGrainCylindrical!(sim, [0.0,0.0], 1.0, 0.5, | |
fracture_toughness=1285e3, | |
- lin_vel=[0., 1.], fixed=true, verbose=verbose) | |
-Granular.addGrainCylindrical!(sim, [2.,0.], 1., 0.5, | |
+ lin_vel=[0., 1.0], fixed=true, verbose=verbose) | |
+Granular.addGrainCylindrical!(sim, [2.0,0.0], 1.0, 0.5, | |
fracture_toughness=1285e3, | |
fixed=true, verbose=verbose) | |
@test count(x->x==true, sim.grains[1].compressive_failure) == 0 | |
t@@ -128,11 +128,11 @@ Granular.run!(sim, single_step=true, verbose=verbose) | |
@test count(x->x==true, sim.grains[1].compressive_failure) == 0 | |
sim = Granular.createSimulation("overlap") | |
-Granular.addGrainCylindrical!(sim, [0.,0.], 1., 0.5, | |
- fracture_toughness=1., | |
+Granular.addGrainCylindrical!(sim, [0.,0.], 1.0, 0.5, | |
+ fracture_toughness=1.0, | |
fixed=true, verbose=verbose) | |
-Granular.addGrainCylindrical!(sim, [0.0+1e-9,0.], 1., 0.5, | |
- fracture_toughness=1., | |
+Granular.addGrainCylindrical!(sim, [0.0+1e-9,0.0], 1.0, 0.5, | |
+ fracture_toughness=1.0, | |
fixed=true, verbose=verbose) | |
Granular.setTimeStep!(sim, verbose=verbose) | |
Granular.setTotalTime!(sim, 1.0) | |
t@@ -141,11 +141,11 @@ Granular.run!(sim, single_step=true, verbose=verbose) | |
@test sim.grains[1].contact_area[1] ≈ π*1.0^2 | |
sim = Granular.createSimulation("overlap") | |
-Granular.addGrainCylindrical!(sim, [0.,0.], 1., 0.5, | |
- fracture_toughness=1., | |
+Granular.addGrainCylindrical!(sim, [0.,0.], 1.0, 0.5, | |
+ fracture_toughness=1.0, | |
fixed=true, verbose=verbose) | |
-Granular.addGrainCylindrical!(sim, [0.1,0.], 1., 0.5, | |
- fracture_toughness=1., | |
+Granular.addGrainCylindrical!(sim, [0.1,0.], 1.0, 0.5, | |
+ fracture_toughness=1.0, | |
fixed=true, verbose=verbose) | |
Granular.setTimeStep!(sim, verbose=verbose) | |
Granular.setTotalTime!(sim, 1.0) | |
t@@ -155,11 +155,11 @@ Granular.run!(sim, single_step=true, verbose=verbose) | |
@test sim.grains[1].contact_area[1] > 0. | |
sim = Granular.createSimulation("overlap") | |
-Granular.addGrainCylindrical!(sim, [0.,0.], 1., 0.5, | |
- fracture_toughness=1., | |
+Granular.addGrainCylindrical!(sim, [0.0,0.0], 1.0, 0.5, | |
+ fracture_toughness=1.0, | |
fixed=true, verbose=verbose) | |
-Granular.addGrainCylindrical!(sim, [0.+1e-9,0.], 0.1, 0.5, | |
- fracture_toughness=1., | |
+Granular.addGrainCylindrical!(sim, [0.0+1e-9,0.0], 0.1, 0.5, | |
+ fracture_toughness=1.0, | |
fixed=true, verbose=verbose) | |
@test count(x->x==true, sim.grains[1].compressive_failure) == 0 | |
Granular.setTimeStep!(sim, verbose=verbose) | |
t@@ -170,11 +170,11 @@ Granular.run!(sim, single_step=true, verbose=verbose) | |
@test sim.grains[1].contact_area[1] ≈ π*0.1^2 | |
sim = Granular.createSimulation("overlap") | |
-Granular.addGrainCylindrical!(sim, [0.,0.], 1., 0.5, | |
- fracture_toughness=1., | |
+Granular.addGrainCylindrical!(sim, [0.0,0.0], 1.0, 0.5, | |
+ fracture_toughness=1.0, | |
fixed=true, verbose=verbose) | |
Granular.addGrainCylindrical!(sim, [0.3,0.4], 0.1, 0.5, | |
- fracture_toughness=1., | |
+ fracture_toughness=1.0, | |
fixed=true, verbose=verbose) | |
@test count(x->x==true, sim.grains[1].compressive_failure) == 0 | |
Granular.setTimeStep!(sim, verbose=verbose) | |
diff --git a/test/contact-search-and-geometry.jl b/test/contact-search-and-geom… | |
t@@ -1,10 +1,10 @@ | |
#!/usr/bin/env julia | |
-using Compat.Test | |
+using Test | |
import Granular | |
# Check the contact search and geometry of a two-particle interaction | |
-Compat.@info "Testing interGrainPositionVector(...) and findOverlap(...)" | |
+@info "Testing interGrainPositionVector(...) and findOverlap(...)" | |
sim = Granular.createSimulation("test") | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [ 0.01, 0.01], 10., 1., verbose=false) | |
t@@ -17,12 +17,12 @@ overlap_ij = Granular.findOverlap(sim, 1, 2, position_ij) | |
@test -2. ≈ overlap_ij | |
-Compat.@info "Testing findContactsAllToAll(...)" | |
+@info "Testing findContactsAllToAll(...)" | |
sim_copy = deepcopy(sim) | |
Granular.findContactsAllToAll!(sim) | |
-Compat.@info "Testing findContacts(...)" | |
+@info "Testing findContacts(...)" | |
sim = deepcopy(sim_copy) | |
Granular.findContacts!(sim) | |
t@@ -43,7 +43,7 @@ end | |
@test 1 == sim.grains[1].n_contacts | |
@test 1 == sim.grains[2].n_contacts | |
-Compat.@info "Testing findContacts(...)" | |
+@info "Testing findContacts(...)" | |
sim = deepcopy(sim_copy) | |
Granular.findContacts!(sim) | |
t@@ -116,7 +116,7 @@ end | |
@test 0 == sim.grains[1].n_contacts | |
@test 0 == sim.grains[2].n_contacts | |
-Compat.@info "Testing if interact(...) removes contacts correctly" | |
+@info "Testing if interact(...) removes contacts correctly" | |
sim = deepcopy(sim_copy) | |
Granular.findContacts!(sim) | |
Granular.interact!(sim) | |
t@@ -138,7 +138,7 @@ end | |
@test 1 == sim.grains[2].n_contacts | |
-Compat.@info "Testing findContactsGrid(...)" | |
+@info "Testing findContactsGrid(...)" | |
sim = deepcopy(sim_copy) | |
sim.ocean = Granular.createRegularOceanGrid([4, 4, 2], [80., 80., 2.]) | |
Granular.sortGrainsInGrid!(sim, sim.ocean) | |
t@@ -200,7 +200,7 @@ end | |
@test 0 == sim.grains[1].n_contacts | |
@test 0 == sim.grains[2].n_contacts | |
-Compat.@info "Testing findContacts(...)" | |
+@info "Testing findContacts(...)" | |
sim = deepcopy(sim_copy) | |
sim.ocean = Granular.createRegularOceanGrid([4, 4, 2], [80., 80., 2.]) | |
Granular.sortGrainsInGrid!(sim, sim.ocean) | |
t@@ -222,7 +222,7 @@ end | |
@test_throws ErrorException Granular.findContacts!(sim, method="") | |
-Compat.@info "Testing contact registration with multiple contacts" | |
+@info "Testing contact registration with multiple contacts" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [2., 2.], 1.01, 1., verbose=false) | |
Granular.addGrainCylindrical!(sim, [4., 2.], 1.01, 1., verbose=false) | |
t@@ -266,7 +266,7 @@ for i=1:9 | |
@test sim.grains[i].n_contacts == 0 | |
end | |
-Compat.@info "Test contact search in regular square grid (all to all)" | |
+@info "Test contact search in regular square grid (all to all)" | |
sim = Granular.createSimulation() | |
nx = 60; ny = 50 | |
Granular.regularPacking!(sim, [nx, ny], 1., 1., padding_factor=0, | |
t@@ -283,7 +283,7 @@ for j=2:(ny-1) | |
end | |
end | |
-Compat.@info "Test contact search in regular square grid (sorting grid)" | |
+@info "Test contact search in regular square grid (sorting grid)" | |
sim = Granular.createSimulation() | |
nx = 60; ny = 50 | |
Granular.regularPacking!(sim, [nx, ny], 1., 1., padding_factor=0, | |
t@@ -301,7 +301,7 @@ for j=2:(ny-1) | |
end | |
end | |
-Compat.@info "Test changes to the max. number of contacts" | |
+@info "Test changes to the max. number of contacts" | |
sim = Granular.createSimulation() | |
nx = 60; ny = 50 | |
Granular.regularPacking!(sim, [nx, ny], 1., 1., padding_factor=0, | |
t@@ -312,7 +312,7 @@ Granular.regularPacking!(sim, [nx, ny], 1., 1., padding_fa… | |
@test_throws ErrorException Granular.setMaximumNumberOfContactsPerGrain!(sim,3… | |
for Nc_max in [4, 32, 33, 100, 1] | |
- info("Nc_max = $Nc_max") | |
+ @info("Nc_max = $Nc_max") | |
Granular.setMaximumNumberOfContactsPerGrain!(sim, Nc_max) | |
for grain in sim.grains | |
@test length(grain.contacts) == Nc_max | |
diff --git a/test/grain.jl b/test/grain.jl | |
t@@ -2,12 +2,12 @@ | |
# Check the basic icefloe functionality | |
-Compat.@info "Writing simple simulation to VTK file" | |
+@info "Writing simple simulation to VTK file" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 10., 1., verbose=false) | |
Granular.printGrainInfo(sim.grains[1]) | |
-Compat.@info "Testing grain value checks " | |
+@info "Testing grain value checks " | |
@test_throws ErrorException Granular.addGrainCylindrical!(sim, [.1, .1, .1, .1… | |
10., 1.) | |
@test_throws ErrorException Granular.addGrainCylindrical!(sim, [.1, .1], | |
t@@ -22,7 +22,7 @@ Compat.@info "Testing grain value checks " | |
10., 1., density=-2.) | |
@test_throws ErrorException Granular.disableGrain!(sim, 0) | |
-Compat.@info "Testing grain comparison " | |
+@info "Testing grain comparison " | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 10., 1., verbose=false) | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 10., 1., verbose=false) | |
t@@ -34,12 +34,12 @@ try | |
run(`gnuplot --version`) | |
catch return_signal | |
if isa(return_signal, Base.UVError) | |
- Compat.@warn "Skipping plotting routines: Could not launch gnuplot pro… | |
+ @warn "Skipping plotting routines: Could not launch gnuplot process" | |
global gnuplot = false | |
end | |
end | |
if gnuplot | |
- Compat.@info "Testing GSD plotting " | |
+ @info "Testing GSD plotting " | |
Granular.plotGrainSizeDistribution(sim) | |
@test isfile("test-grain-size-distribution.png") | |
rm("test-grain-size-distribution.png") | |
t@@ -54,30 +54,30 @@ if gnuplot | |
@test_throws ErrorException Granular.plotGrainSizeDistribution(sim, size_t… | |
- Compat.@info "Testing grain plotting" | |
+ @info "Testing grain plotting" | |
Granular.plotGrains(sim, show_figure=false) | |
@test isfile("test/test.grains.0.png") | |
rm("test/test.grains.0.png") | |
- Compat.@info " - contact_radius" | |
+ @info " - contact_radius" | |
Granular.plotGrains(sim, palette_scalar="contact_radius", show_figure=fals… | |
@test isfile("test/test.grains.0.png") | |
rm("test/test.grains.0.png") | |
- Compat.@info " - areal_radius" | |
+ @info " - areal_radius" | |
Granular.plotGrains(sim, palette_scalar="areal_radius", show_figure=false) | |
@test isfile("test/test.grains.0.png") | |
rm("test/test.grains.0.png") | |
- Compat.@info " - color" | |
+ @info " - color" | |
Granular.plotGrains(sim, palette_scalar="color", show_figure=false) | |
@test isfile("test/test.grains.0.png") | |
rm("test/test.grains.0.png") | |
- Compat.@info " - invalid field" | |
+ @info " - invalid field" | |
@test_throws ErrorException Granular.plotGrains(sim, palette_scalar="asdf", | |
show_figure=false) | |
end | |
-Compat.@info "Testing external body force routines" | |
+@info "Testing external body force routines" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 10., 1., verbose=false) | |
Granular.setBodyForce!(sim.grains[1], [1., 2., 0.]) | |
t@@ -85,7 +85,7 @@ Granular.setBodyForce!(sim.grains[1], [1., 2., 0.]) | |
Granular.addBodyForce!(sim.grains[1], [1., 2., 0.]) | |
@test sim.grains[1].external_body_force ≈ [2., 4., 0.] | |
-Compat.@info "Testing zeroKinematics!()" | |
+@info "Testing zeroKinematics!()" | |
sim.grains[1].force .= ones(3) | |
sim.grains[1].lin_acc .= ones(3) | |
sim.grains[1].lin_vel .= ones(3) | |
diff --git a/test/grid-boundaries.jl b/test/grid-boundaries.jl | |
t@@ -1,11 +1,10 @@ | |
#!/usr/bin/env julia | |
-import Compat | |
verbose=false | |
-Compat.@info "## Inactive/Periodic BCs" | |
+@info "## Inactive/Periodic BCs" | |
-Compat.@info "Testing assignment and reporting of grid boundary conditions" | |
+@info "Testing assignment and reporting of grid boundary conditions" | |
ocean = Granular.createEmptyOcean() | |
@test ocean.bc_west == 1 | |
t@@ -13,8 +12,8 @@ ocean = Granular.createEmptyOcean() | |
@test ocean.bc_north == 1 | |
@test ocean.bc_south == 1 | |
-if !Compat.Sys.iswindows() | |
- const originalSTDOUT = Compat.stdout | |
+if !Sys.iswindows() | |
+ const originalSTDOUT = stdout | |
(out_r, out_w) = redirect_stdout() | |
Granular.reportGridBoundaryConditions(ocean) | |
close(out_w) | |
t@@ -157,7 +156,7 @@ if !Compat.Sys.iswindows() | |
"asdf") | |
end | |
-Compat.@info "Testing granular interaction across periodic boundaries" | |
+@info "Testing granular interaction across periodic boundaries" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([5, 5, 2], [1., 1., 1.]) | |
Granular.setGridBoundaryConditions!(sim.ocean, "periodic") | |
t@@ -176,7 +175,7 @@ Granular.findContacts!(sim, method="ocean grid") | |
@test 1 == sim.grains[2].n_contacts | |
-Compat.@info "Test grain position adjustment across periodic boundaries" | |
+@info "Test grain position adjustment across periodic boundaries" | |
# do not readjust inside grid, inactive boundaries | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([5, 5, 2], [1., 1., 1.]) | |
t@@ -242,9 +241,9 @@ Granular.addGrainCylindrical!(sim, [0.3, 1.1], 0.11, 0.1, … | |
@test_throws ErrorException Granular.moveGrainsAcrossPeriodicBoundaries!(sim) | |
-Compat.@info "## Impermeable BCs" | |
+@info "## Impermeable BCs" | |
-Compat.@info "Test grain velocity adjustment across impermeable boundaries" | |
+@info "Test grain velocity adjustment across impermeable boundaries" | |
# do not readjust inside grid, inactive boundaries | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([5, 5, 2], [1., 1., 1.]) | |
diff --git a/test/grid.jl b/test/grid.jl | |
t@@ -1,5 +1,5 @@ | |
#!/usr/bin/env julia | |
-using Compat.Test | |
+using Test | |
import Granular | |
# Check the grid interpolation and sorting functions | |
t@@ -9,7 +9,7 @@ if Granular.hasNetCDF | |
ocean = Granular.readOceanNetCDF("Baltic/00010101.ocean_month.nc", | |
"Baltic/ocean_hgrid.nc") | |
- Compat.@info "Testing coordinate retrieval functions" | |
+ @info "Testing coordinate retrieval functions" | |
sw, se, ne, nw = Granular.getCellCornerCoordinates(ocean.xq, ocean.yq, 1, … | |
@test sw ≈ [6., 53.] | |
@test se ≈ [7., 53.] | |
t@@ -17,12 +17,12 @@ if Granular.hasNetCDF | |
@test nw ≈ [6., 54.] | |
@test Granular.getCellCenterCoordinates(ocean.xh, ocean.yh, 1, 1) ≈ [6.5… | |
- Compat.@info "Testing area-determination methods" | |
+ @info "Testing area-determination methods" | |
@test Granular.areaOfTriangle([0., 0.], [1., 0.], [0., 1.]) ≈ .5 | |
@test Granular.areaOfTriangle([1., 0.], [0., 1.], [0., 0.]) ≈ .5 | |
@test Granular.areaOfQuadrilateral([1., 0.], [0., 1.], [0., 0.], [1., 1.])… | |
- Compat.@info "Testing area-based cell content determination" | |
+ @info "Testing area-based cell content determination" | |
@test Granular.isPointInCell(ocean, 1, 1, [6.5, 53.5], sw, se, ne, nw) == … | |
@test Granular.isPointInCell(ocean, 1, 1, [6.5, 53.5]) == true | |
@test Granular.getNonDimensionalCellCoordinates(ocean, 1, 1, [6.5, 53.5]) … | |
t@@ -43,7 +43,7 @@ if Granular.hasNetCDF | |
x_tilde, _ = Granular.getNonDimensionalCellCoordinates(ocean, 1, 1, [0., 5… | |
@test x_tilde < 0. | |
- Compat.@info "Testing conformal mapping methods" | |
+ @info "Testing conformal mapping methods" | |
@test Granular.conformalQuadrilateralCoordinates([0., 0.], | |
[5., 0.], | |
[5., 3.], | |
t@@ -65,7 +65,7 @@ if Granular.hasNetCDF | |
[5., … | |
[7.5,… | |
- Compat.@info "Checking cell content using conformal mapping methods" | |
+ @info "Checking cell content using conformal mapping methods" | |
@test Granular.isPointInCell(ocean, 1, 1, [6.4, 53.4], sw, se, ne, nw, | |
method="Conformal") == true | |
@test Granular.isPointInCell(ocean, 1, 1, [6.1, 53.5], sw, se, ne, nw, | |
t@@ -83,7 +83,7 @@ if Granular.hasNetCDF | |
@test Granular.isPointInCell(ocean, 1, 1, [0.0, 53.5], sw, se, ne, nw, | |
method="Conformal") == false | |
- Compat.@info "Testing bilinear interpolation scheme on conformal mapping" | |
+ @info "Testing bilinear interpolation scheme on conformal mapping" | |
ocean.u[1, 1, 1, 1] = 1.0 | |
ocean.u[2, 1, 1, 1] = 1.0 | |
ocean.u[2, 2, 1, 1] = 0.0 | |
t@@ -112,12 +112,12 @@ if Granular.hasNetCDF | |
@test val[1] ≈ .25 | |
@test val[2] ≈ .25 | |
- Compat.@info "Testing cell binning - Area-based approach" | |
+ @info "Testing cell binning - Area-based approach" | |
@test Granular.findCellContainingPoint(ocean, [6.2,53.4], method="Area") =… | |
@test Granular.findCellContainingPoint(ocean, [7.2,53.4], method="Area") =… | |
@test Granular.findCellContainingPoint(ocean, [0.2,53.4], method="Area") =… | |
- Compat.@info "Testing cell binning - Conformal mapping" | |
+ @info "Testing cell binning - Conformal mapping" | |
@test Granular.findCellContainingPoint(ocean, [6.2,53.4], method="Conforma… | |
(1, 1) | |
@test Granular.findCellContainingPoint(ocean, [7.2,53.4], method="Conforma… | |
t@@ -139,7 +139,7 @@ if Granular.hasNetCDF | |
@test sim.ocean.grain_list[2, 1] == [3] | |
end | |
-Compat.@info "Testing ocean drag" | |
+@info "Testing ocean drag" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([4, 4, 2], [4., 4., 2.]) | |
sim.ocean.u[:,:,1,1] .= 5. | |
t@@ -167,7 +167,7 @@ Granular.addOceanDrag!(sim) | |
@test sim.grains[2].force[1] < 0. | |
@test sim.grains[2].force[2] > 0. | |
-Compat.@info "Testing curl function" | |
+@info "Testing curl function" | |
ocean.u[1, 1, 1, 1] = 1.0 | |
ocean.u[2, 1, 1, 1] = 1.0 | |
ocean.u[2, 2, 1, 1] = 0.0 | |
t@@ -186,7 +186,7 @@ ocean.u[1, 2, 1, 1] = 1.0 | |
ocean.v[:, :, 1, 1] .= 0.0 | |
@test Granular.curl(ocean, .5, .5, 1, 1, 1, 1, sw, se, ne, nw) < 0. | |
-Compat.@info "Testing atmosphere drag" | |
+@info "Testing atmosphere drag" | |
sim = Granular.createSimulation() | |
sim.atmosphere = Granular.createRegularAtmosphereGrid([4, 4, 2], [4., 4., 2.]) | |
atmosphere = Granular.createRegularAtmosphereGrid([4, 4, 2], [4., 4., 2.]) | |
t@@ -212,7 +212,7 @@ Granular.addAtmosphereDrag!(sim) | |
@test sim.grains[2].force[1] < 0. | |
@test sim.grains[2].force[2] > 0. | |
-Compat.@info "Testing curl function" | |
+@info "Testing curl function" | |
atmosphere.u[1, 1, 1, 1] = 1.0 | |
atmosphere.u[2, 1, 1, 1] = 1.0 | |
atmosphere.u[2, 2, 1, 1] = 0.0 | |
t@@ -230,8 +230,8 @@ atmosphere.v[:, :, 1, 1] .= 0.0 | |
@test Granular.curl(atmosphere, .5, .5, 1, 1, 1, 1, sw, se, ne, nw) < 0. | |
-Compat.@info "Testing findEmptyPositionInGridCell" | |
-Compat.@info "# Insert into empty cell" | |
+@info "Testing findEmptyPositionInGridCell" | |
+@info "# Insert into empty cell" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([4, 4, 2], [4., 4., 2.]) | |
Granular.sortGrainsInGrid!(sim, sim.ocean, verbose=verbose) | |
t@@ -240,7 +240,7 @@ pos = Granular.findEmptyPositionInGridCell(sim, sim.ocean,… | |
@test pos != false | |
@test Granular.isPointInCell(sim.ocean, 1, 1, pos) == true | |
-Compat.@info "# Insert into cell with one other ice floe" | |
+@info "# Insert into cell with one other ice floe" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([4, 4, 2], [4., 4., 2.]) | |
Granular.addGrainCylindrical!(sim, [.25, .25], .25, 1., verbose=verbose) | |
t@@ -250,7 +250,7 @@ pos = Granular.findEmptyPositionInGridCell(sim, sim.ocean,… | |
@test pos != false | |
@test Granular.isPointInCell(sim.ocean, 1, 1, pos) == true | |
-Compat.@info "# Insert into cell with two other grains" | |
+@info "# Insert into cell with two other grains" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([4, 4, 2], [4., 4., 2.]) | |
Granular.addGrainCylindrical!(sim, [.25, .25], .25, 1., verbose=verbose) | |
t@@ -261,7 +261,7 @@ pos = Granular.findEmptyPositionInGridCell(sim, sim.ocean,… | |
@test pos != false | |
@test Granular.isPointInCell(sim.ocean, 1, 1, pos) == true | |
-Compat.@info "# Insert into full cell" | |
+@info "# Insert into full cell" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([4, 4, 2], [4., 4., 2.]) | |
Granular.addGrainCylindrical!(sim, [.25, .25], 1., 1., verbose=verbose) | |
t@@ -273,7 +273,7 @@ pos = Granular.findEmptyPositionInGridCell(sim, sim.ocean,… | |
verbose=false) | |
@test pos == false | |
-Compat.@info "# Insert into empty cell" | |
+@info "# Insert into empty cell" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([4, 4, 2], [4., 4., 2.]) | |
Granular.sortGrainsInGrid!(sim, sim.ocean, verbose=verbose) | |
t@@ -282,7 +282,7 @@ pos = Granular.findEmptyPositionInGridCell(sim, sim.ocean,… | |
@test pos != false | |
@test Granular.isPointInCell(sim.ocean, 2, 2, pos) == true | |
-Compat.@info "# Insert into full cell" | |
+@info "# Insert into full cell" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([4, 4, 2], [4., 4., 2.]) | |
Granular.addGrainCylindrical!(sim, [1.5, 1.5], 1., 1., verbose=verbose) | |
t@@ -294,7 +294,7 @@ pos = Granular.findEmptyPositionInGridCell(sim, sim.ocean,… | |
verbose=false) | |
@test pos == false | |
-Compat.@info "Test default sorting with ocean/atmosphere grids" | |
+@info "Test default sorting with ocean/atmosphere grids" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([4, 4, 2], [4., 4., 2.]) | |
sim.atmosphere = Granular.createRegularAtmosphereGrid([4, 4, 2], [4., 4.000001… | |
t@@ -319,7 +319,7 @@ Granular.run!(sim, single_step=true, verbose=verbose) | |
@test sim.atmosphere.grain_list[2, 2] == [] | |
@test sim.atmosphere.grain_list[3, 3] == [3] | |
-Compat.@info "Test optimization when ocean/atmosphere grids are collocated" | |
+@info "Test optimization when ocean/atmosphere grids are collocated" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([4, 4, 2], [4., 4., 2.]) | |
sim.atmosphere = Granular.createRegularAtmosphereGrid([4, 4, 2], [4., 4., 2.]) | |
t@@ -344,7 +344,7 @@ Granular.run!(sim, single_step=true, verbose=false) | |
@test sim.atmosphere.grain_list[2, 2] == [] | |
@test sim.atmosphere.grain_list[3, 3] == [3] | |
-Compat.@info "Testing automatic grid-size adjustment" | |
+@info "Testing automatic grid-size adjustment" | |
# ocean grid | |
sim = Granular.createSimulation() | |
@test_throws ErrorException Granular.fitGridToGrains!(sim, sim.ocean) | |
t@@ -405,7 +405,7 @@ Granular.fitGridToGrains!(sim, sim.atmosphere, padding=.5,… | |
@test sim.atmosphere.xq[end,end] ≈ 3.5 | |
@test sim.atmosphere.yq[end,end] ≈ 5.5 | |
-Compat.@info "Testing porosity estimation" | |
+@info "Testing porosity estimation" | |
sim = Granular.createSimulation() | |
dx = 1.0; dy = 1.0 | |
nx = 3; ny = 3 | |
diff --git a/test/jld.jl b/test/jld.jl | |
t@@ -1,11 +1,10 @@ | |
#!/usr/bin/env julia | |
-import Compat | |
-Compat.@info "Determining if JLD is installed" | |
+@info "Determining if JLD is installed" | |
if Granular.hasJLD | |
- Compat.@info "JLD found, proceeding with JLD-specific tests" | |
+ @info "JLD found, proceeding with JLD-specific tests" | |
- Compat.@info "Writing simple simulation to JLD file" | |
+ @info "Writing simple simulation to JLD file" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 10., 1., verbose=false) | |
Granular.addGrainCylindrical!(sim, [18., 0.], 10., 1., verbose=false) | |
t@@ -16,11 +15,11 @@ if Granular.hasJLD | |
Granular.writeSimulation(sim) | |
Granular.writeSimulationStatus(sim) | |
- Compat.@info "Reading from JLD file by specifying the input file name" | |
+ @info "Reading from JLD file by specifying the input file name" | |
sim2 = Granular.readSimulation("./test/test.1.jld") | |
Granular.compareSimulations(sim, sim2) | |
- Compat.@info "Reading and overwriting from JLD file by simulation id" | |
+ @info "Reading and overwriting from JLD file by simulation id" | |
sim3 = Granular.createSimulation("test") | |
@test 1 == Granular.readSimulationStatus(sim3) | |
sim3 = Granular.readSimulation(sim3) | |
diff --git a/test/netcdf.jl b/test/netcdf.jl | |
t@@ -5,7 +5,7 @@ | |
@test_throws ErrorException Granular.readOceanStateNetCDF("nonexistentfile") | |
@test_throws ErrorException Granular.readOceanGridNetCDF("nonexistentfile") | |
-Compat.@info "Testing dimensions of content read from Baltic test case" | |
+@info "Testing dimensions of content read from Baltic test case" | |
ocean = Granular.readOceanNetCDF("Baltic/00010101.ocean_month.nc", | |
"Baltic/ocean_hgrid.nc") | |
@test ocean.time / (24. * 60. * 60.) ≈ [.5, 1.5, 2.5, 3.5, 4.5] | |
t@@ -18,7 +18,7 @@ ocean = Granular.readOceanNetCDF("Baltic/00010101.ocean_mont… | |
@test size(ocean.h) == (23, 14, 63, 5) | |
@test size(ocean.e) == (23, 14, 64, 5) | |
-Compat.@info "Testing ocean state interpolation" | |
+@info "Testing ocean state interpolation" | |
@test_throws ErrorException Granular.interpolateOceanState(ocean, time=0.) | |
@test_throws ErrorException Granular.interpolateOceanState(ocean, time=1.e34) | |
u1, v1, h1, e1 = Granular.interpolateOceanState(ocean, ocean.time[1]) | |
diff --git a/test/ocean.jl b/test/ocean.jl | |
t@@ -3,7 +3,7 @@ | |
# Check if ocean-specific functions and grid operations are functioning | |
# correctly | |
-Compat.@info "Testing regular grid generation" | |
+@info "Testing regular grid generation" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([6, 6, 6], [1., 1., 1.]) | |
@test size(sim.ocean.xq) == (7, 7) | |
t@@ -25,7 +25,7 @@ sim.ocean = Granular.createRegularOceanGrid([6, 6, 6], [1., … | |
@test sim.ocean.h ≈ zeros(7, 7, 6, 1) | |
@test sim.ocean.e ≈ zeros(7, 7, 6, 1) | |
-Compat.@info "Testing velocity drag interaction (static ocean)" | |
+@info "Testing velocity drag interaction (static ocean)" | |
Granular.addGrainCylindrical!(sim, [.5, .5], .25, .1) | |
Granular.setTotalTime!(sim, 5.) | |
Granular.setTimeStep!(sim) | |
t@@ -41,7 +41,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEnergy… | |
@test sim.grains[1].ocean_stress[1] < 0. | |
@test sim.grains[1].ocean_stress[2] ≈ 0. | |
-Compat.@info "Testing velocity drag interaction (static ice floe)" | |
+@info "Testing velocity drag interaction (static ice floe)" | |
sim = deepcopy(sim_init) | |
sim.ocean.v[:, :, 1, 1] .= 0.1 | |
E_kin_lin_init = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -54,7 +54,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEnergy… | |
@test sim.grains[1].ocean_stress[1] ≈ 0. | |
@test sim.grains[1].ocean_stress[2] > 0. | |
-Compat.@info "Testing vortex interaction (static ocean)" | |
+@info "Testing vortex interaction (static ocean)" | |
sim = deepcopy(sim_init) | |
sim.grains[1].ang_vel[3] = 0.1 | |
E_kin_lin_init = Granular.totalGrainKineticTranslationalEnergy(sim) | |
t@@ -67,7 +67,7 @@ E_kin_rot_final = Granular.totalGrainKineticRotationalEnergy… | |
@test sim.grains[1].ang_pos[3] > 0. # check angular position orientation | |
@test E_kin_lin_init ≈ E_kin_lin_final # no linear velocity gained | |
-Compat.@info "Testing vortex interaction (static ice floe)" | |
+@info "Testing vortex interaction (static ice floe)" | |
sim = deepcopy(sim_init) | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [1., 1., 1.]) | |
sim.grains[1].lin_pos[1] = 0.5 | |
diff --git a/test/packing.jl b/test/packing.jl | |
t@@ -1,12 +1,12 @@ | |
#!/usr/bin/env julia | |
-using Compat.Test | |
+using Test | |
import Granular | |
verbose = false | |
plot = false | |
plot_packings=false | |
-Compat.@info "Testing regular packing generation (power law GSD)" | |
+@info "Testing regular packing generation (power law GSD)" | |
sim = Granular.createSimulation() | |
Granular.regularPacking!(sim, [2, 2], 1., 1., size_distribution="powerlaw") | |
@test 4 == length(sim.grains) | |
t@@ -23,7 +23,7 @@ for grain in sim.grains | |
end | |
plot && Granular.plotGrains(sim, filetype="regular-powerlaw.png", show_figure=… | |
-Compat.@info "Testing regular packing generation (uniform GSD)" | |
+@info "Testing regular packing generation (uniform GSD)" | |
sim = Granular.createSimulation() | |
Granular.regularPacking!(sim, [2, 2], 1., 1., size_distribution="uniform") | |
@test 4 == length(sim.grains) | |
t@@ -41,7 +41,7 @@ end | |
plot && Granular.plotGrains(sim, filetype="regular-uniform.png", show_figure=f… | |
-Compat.@info "Testing irregular (Poisson-disk) packing generation (monodispers… | |
+@info "Testing irregular (Poisson-disk) packing generation (monodisperse size)" | |
sim = Granular.createSimulation("poisson1-monodisperse-nopadding") | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [1., 1., 1.]) | |
Granular.irregularPacking!(sim, | |
t@@ -52,7 +52,7 @@ Granular.irregularPacking!(sim, | |
verbose=verbose) | |
@test length(sim.grains) > 23 | |
-Compat.@info "Testing irregular (Poisson-disk) packing generation (wide PSD)" | |
+@info "Testing irregular (Poisson-disk) packing generation (wide PSD)" | |
sim = Granular.createSimulation("poisson2-wide-nopadding") | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [1., 1., 1.]) | |
Granular.irregularPacking!(sim, | |
t@@ -82,7 +82,7 @@ Granular.irregularPacking!(sim, | |
verbose=verbose) | |
@test length(sim.grains) > 280 | |
-Compat.@info "Testing irregular packing with inactive boundaries" | |
+@info "Testing irregular packing with inactive boundaries" | |
sim = Granular.createSimulation("poisson-inactive") | |
sim.ocean = Granular.createRegularOceanGrid([5, 5, 1], [1., 1., 1.]) | |
Granular.setGridBoundaryConditions!(sim.ocean, "inactive", verbose=verbose) | |
t@@ -98,7 +98,7 @@ for grain in sim.grains | |
@test grain.n_contacts == 0 | |
end | |
-Compat.@info "Testing irregular packing with periodic boundaries" | |
+@info "Testing irregular packing with periodic boundaries" | |
sim = Granular.createSimulation("poisson-periodic") | |
sim.ocean = Granular.createRegularOceanGrid([5, 5, 1], [1., 1., 1.]) | |
Granular.setGridBoundaryConditions!(sim.ocean, "periodic", verbose=verbose) | |
t@@ -115,7 +115,7 @@ for grain in sim.grains | |
end | |
-Compat.@info "Testing raster-based mapping algorithm" | |
+@info "Testing raster-based mapping algorithm" | |
sim = Granular.createSimulation("raster-packing1") | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [1., 1., 1.]) | |
Granular.addGrainCylindrical!(sim, [0.5, 0.5], 0.4, 1.0) | |
t@@ -153,14 +153,14 @@ occupied_ans = Array{Bool}([ | |
sim_init = deepcopy(sim) | |
plot && Granular.plotGrains(sim, filetype="rastermap.png", show_figure=false) | |
-Compat.@info "Testing raster-based mapping algorithm (power law GSD)" | |
+@info "Testing raster-based mapping algorithm (power law GSD)" | |
sim = deepcopy(sim_init) | |
np_init = length(sim.grains) | |
Granular.rasterPacking!(sim, 0.02, 0.04, verbose=verbose) | |
@test np_init < length(sim.grains) | |
plot && Granular.plotGrains(sim, filetype="powerlaw.png", show_figure=false) | |
-Compat.@info "Testing raster-based mapping algorithm (uniform GSD)" | |
+@info "Testing raster-based mapping algorithm (uniform GSD)" | |
sim = deepcopy(sim_init) | |
np_init = length(sim.grains) | |
Granular.rasterPacking!(sim, 0.02, 0.04, size_distribution="uniform", | |
t@@ -168,14 +168,14 @@ Granular.rasterPacking!(sim, 0.02, 0.04, size_distributi… | |
@test np_init < length(sim.grains) | |
plot && Granular.plotGrains(sim, filetype="uniform.png", show_figure=false) | |
-Compat.@info "Tesing square packing" | |
+@info "Tesing square packing" | |
sim = Granular.createSimulation() | |
Granular.regularPacking!(sim, [5,6], 1.0, 1.0, tiling="square", | |
padding_factor=0.0) | |
@test length(sim.grains) == 5*6 | |
plot && Granular.plotGrains(sim, filetype="square.png", show_figure=false) | |
-Compat.@info "Tesing triangular packing" | |
+@info "Tesing triangular packing" | |
sim = Granular.createSimulation() | |
Granular.regularPacking!(sim, [6,6], 1.0, 1.0, tiling="triangular", | |
padding_factor=0.0) | |
diff --git a/test/profiling.jl b/test/profiling.jl | |
t@@ -1,5 +1,4 @@ | |
#!/usr/bin/env julia | |
-using Compat | |
if VERSION < v"0.7.0-DEV.2004" | |
using Base.Test | |
else | |
t@@ -11,7 +10,7 @@ import CurveFit | |
verbose=false | |
-Compat.@info "Testing performance with many interacting grains" | |
+@info "Testing performance with many interacting grains" | |
function timeSingleStepInDenseSimulation(nx::Int; verbose::Bool=true, | |
profile::Bool=false, | |
t@@ -46,18 +45,18 @@ function timeSingleStepInDenseSimulation(nx::Int; verbose:… | |
fixed=fixed, verbose=false) | |
end | |
end | |
- Compat.printstyled("number of grains: $(length(sim.grains))\n", | |
+ printstyled("number of grains: $(length(sim.grains))\n", | |
color=:green) | |
if grid_sorting | |
if include_atmosphere | |
- Compat.printstyled("using cell-based spatial decomposition " * | |
+ printstyled("using cell-based spatial decomposition " * | |
" (ocean + atmosphere)\n", color=:green) | |
else | |
- Compat.printstyled("using cell-based spatial " * | |
+ printstyled("using cell-based spatial " * | |
"decomposition (ocean)\n", color=:green) | |
end | |
else | |
- Compat.printstyled("using all-to-all contact search\n", color=:green) | |
+ printstyled("using all-to-all contact search\n", color=:green) | |
end | |
Granular.setTotalTime!(sim, 1.0) | |
t@@ -103,7 +102,7 @@ memory_usage_all_to_all = zeros(length(nx)) | |
memory_usage_cell_sorting = zeros(length(nx)) | |
memory_usage_cell_sorting2 = zeros(length(nx)) | |
for i=1:length(nx) | |
- Compat.@info "nx = $(nx[i])" | |
+ @info "nx = $(nx[i])" | |
t_elapsed_all_to_all[i], memory_usage_all_to_all[i] = | |
timeSingleStepInDenseSimulation(Int(nx[i]), grid_sorting=false) | |
t_elapsed_cell_sorting[i], memory_usage_cell_sorting[i] = | |
diff --git a/test/runtests.jl b/test/runtests.jl | |
t@@ -1,10 +1,9 @@ | |
-import Compat | |
-using Compat.Test | |
-using Compat.LinearAlgebra | |
+using Test | |
+using LinearAlgebra | |
import Granular | |
function run_test(filename::String) | |
- Compat.printstyled("Info: #### $filename ####\n", color=:green) | |
+ printstyled("Info: #### $filename ####\n", color=:green) | |
include(filename) | |
end | |
diff --git a/test/temporal.jl b/test/temporal.jl | |
t@@ -1,4 +1,4 @@ | |
-Compat.@info "Testing temporal functionality" | |
+@info "Testing temporal functionality" | |
sim = Granular.createSimulation() | |
@test_throws ErrorException Granular.setTimeStep!(sim) | |
diff --git a/test/util.jl b/test/util.jl | |
t@@ -1,10 +1,10 @@ | |
#!/usr/bin/env julia | |
import Granular | |
-import Compat | |
-using Compat.Random | |
-using Compat.Test | |
+import Random | |
+using Random | |
+using Test | |
-Compat.@info "Testing power-law RNG" | |
+@info "Testing power-law RNG" | |
@test 1 == length(Granular.randpower()) | |
@test () == size(Granular.randpower()) | |
t@@ -15,7 +15,7 @@ Compat.@info "Testing power-law RNG" | |
@test 5 == length(Granular.randpower(5)) | |
@test (5,) == size(Granular.randpower(5)) | |
-srand(1) | |
+Random.seed!(1) | |
for i=1:10^5 | |
@test 0. <= Granular.randpower() <= 1. | |
@test 0. <= Granular.randpower(1, 1., 0., 1.) <= 1. | |
diff --git a/test/vtk.jl b/test/vtk.jl | |
t@@ -1,9 +1,8 @@ | |
#!/usr/bin/env julia | |
-import Compat | |
# Check the contact search and geometry of a two-particle interaction | |
-Compat.@info "Writing simple simulation to VTK file" | |
+@info "Writing simple simulation to VTK file" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 10., 1., verbose=false) | |
Granular.addGrainCylindrical!(sim, [18., 0.], 10., 1., verbose=false) | |
t@@ -12,12 +11,12 @@ Granular.findContacts!(sim, method="all to all") | |
Granular.writeVTK(sim, verbose=false) | |
cmd_post = "" | |
-if Compat.Sys.islinux() | |
+if Sys.islinux() | |
cmd = "sha256sum" | |
-elseif Compat.Sys.isapple() | |
+elseif Sys.isapple() | |
cmd = ["shasum", "-a", "256"] | |
-elseif Compat.Sys.iswindows() | |
- Compat.@info "checksum verification not yet implemented on Windows" | |
+elseif Sys.iswindows() | |
+ @info "checksum verification not yet implemented on Windows" | |
exit() | |
cmd = ["powershell", "-Command", "\"Get-FileHash", "-Algorithm", "SHA256"] | |
cmd_post = "\"" | |
t@@ -47,7 +46,7 @@ oceanpath * "\n" | |
Granular.removeSimulationFiles(sim) | |
-Compat.@info "Testing VTK write during run!()" | |
+@info "Testing VTK write during run!()" | |
Granular.setOutputFileInterval!(sim, 1e-9) | |
Granular.setTotalTime!(sim, 1.5) | |
Granular.setTimeStep!(sim) | |
t@@ -58,7 +57,7 @@ Granular.run!(sim, single_step=true) | |
Granular.setOutputFileInterval!(sim, 0.1) | |
Granular.run!(sim) | |
-Compat.@info "Testing status output" | |
+@info "Testing status output" | |
Granular.status() | |
Granular.status(colored_output=false) | |
dir = "empty_directory" | |
t@@ -67,13 +66,13 @@ isdir(dir) || mkdir(dir) | |
Granular.status(dir) | |
rm(dir) | |
-Compat.@info "Testing generation of Paraview Python script" | |
+@info "Testing generation of Paraview Python script" | |
Granular.writeParaviewPythonScript(sim, | |
save_animation=true, | |
save_images=false) | |
@test isfile("$(sim.id)/$(sim.id).py") && filesize("$(sim.id)/$(sim.id).py") >… | |
-Compat.@info "Testing Paraview rendering if `pvpython` is present" | |
+@info "Testing Paraview rendering if `pvpython` is present" | |
try | |
run(`pvpython $(sim.id)/$(sim.id).py`) | |
catch return_signal | |
t@@ -101,7 +100,7 @@ end | |
graininteractionchecksum | |
@test read(`$(cmd) $(oceanpath)$(cmd_post)`, String) == oceanchecksum | |
-Compat.@info "Writing simple simulation to VTK file" | |
+@info "Writing simple simulation to VTK file" | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 10., 1., youngs_modulus=0., verb… | |
Granular.addGrainCylindrical!(sim, [18., 0.], 10., 1., youngs_modulus=0., verb… | |
diff --git a/test/wall.jl b/test/wall.jl | |
t@@ -2,8 +2,8 @@ | |
# Check the basic dynamic wall functionality | |
-Compat.@info "# Test wall initialization" | |
-Compat.@info "Testing argument value checks" | |
+@info "# Test wall initialization" | |
+@info "Testing argument value checks" | |
sim = Granular.createSimulation() | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 10., 2., verbose=false) | |
@test_throws ErrorException Granular.addWallLinearFrictionless!(sim, | |
t@@ -23,7 +23,7 @@ sim = Granular.createSimulation() | |
1.) | |
-Compat.@info "Check that wall mass equals total grain mass and max. thickness" | |
+@info "Check that wall mass equals total grain mass and max. thickness" | |
sim = Granular.createSimulation() | |
@test length(sim.walls) == 0 | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 10., 2., verbose=false) | |
t@@ -33,7 +33,7 @@ Granular.addWallLinearFrictionless!(sim, [1., 0.], 1., verbo… | |
@test sim.walls[1].mass ≈ 1.0 | |
@test sim.walls[1].thickness ≈ 2.0 | |
-Compat.@info "Test wall surface area and defined normal stress" | |
+@info "Test wall surface area and defined normal stress" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 10., 2., verbose=false) | |
t@@ -58,9 +58,9 @@ sim.walls[1].normal = [1.0, 1.0, 1.0] | |
@test_throws ErrorException Granular.getWallSurfaceArea(sim, 1) | |
@test_throws ErrorException Granular.getWallSurfaceArea(sim, [1.,1.], 0.5) | |
-Compat.@info "# Test wall-grain interaction: elastic" | |
+@info "# Test wall-grain interaction: elastic" | |
-Compat.@info "Wall present but no contact" | |
+@info "Wall present but no contact" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 1., 2., verbose=false) | |
t@@ -71,7 +71,7 @@ Granular.interactWalls!(sim) | |
@test sim.grains[1].force[1] ≈ 0. | |
@test sim.grains[1].force[2] ≈ 0. | |
-Compat.@info "Wall present but no contact" | |
+@info "Wall present but no contact" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 1., 2., verbose=false) | |
t@@ -82,7 +82,7 @@ Granular.interactWalls!(sim) | |
@test sim.grains[1].force[1] ≈ 0. | |
@test sim.grains[1].force[2] ≈ 0. | |
-Compat.@info "Wall at -x" | |
+@info "Wall at -x" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 1., 2., youngs_modulus=0., | |
t@@ -94,7 +94,7 @@ Granular.interactWalls!(sim) | |
@test sim.grains[1].force[1] > 0. | |
@test sim.grains[1].force[2] ≈ 0. | |
-Compat.@info "Wall at -x" | |
+@info "Wall at -x" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 1., 2., verbose=false) | |
t@@ -105,7 +105,7 @@ Granular.interactWalls!(sim) | |
@test sim.grains[1].force[1] > 0. | |
@test sim.grains[1].force[2] ≈ 0. | |
-Compat.@info "Wall at +x" | |
+@info "Wall at +x" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 1., 2., verbose=false) | |
t@@ -116,7 +116,7 @@ Granular.interactWalls!(sim) | |
@test sim.grains[1].force[1] < 0. | |
@test sim.grains[1].force[2] ≈ 0. | |
-Compat.@info "Wall at -y" | |
+@info "Wall at -y" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 1., 2., verbose=false) | |
t@@ -127,7 +127,7 @@ Granular.interactWalls!(sim) | |
@test sim.grains[1].force[1] ≈ 0. | |
@test sim.grains[1].force[2] > 0. | |
-Compat.@info "Wall at +y" | |
+@info "Wall at +y" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 1., 2., verbose=false) | |
t@@ -138,9 +138,9 @@ Granular.interactWalls!(sim) | |
@test sim.grains[1].force[1] ≈ 0. | |
@test sim.grains[1].force[2] < 0. | |
-Compat.@info "# Test wall-grain interaction: elastic-viscous" | |
+@info "# Test wall-grain interaction: elastic-viscous" | |
-Compat.@info "Wall present but no contact" | |
+@info "Wall present but no contact" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 1., 2., verbose=false) | |
t@@ -152,7 +152,7 @@ Granular.interactWalls!(sim) | |
@test sim.grains[1].force[1] ≈ 0. | |
@test sim.grains[1].force[2] ≈ 0. | |
-Compat.@info "Wall present but no contact" | |
+@info "Wall present but no contact" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 1., 2., verbose=false) | |
t@@ -164,7 +164,7 @@ Granular.interactWalls!(sim) | |
@test sim.grains[1].force[1] ≈ 0. | |
@test sim.grains[1].force[2] ≈ 0. | |
-Compat.@info "Wall at -x" | |
+@info "Wall at -x" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 1., 2., verbose=false) | |
t@@ -176,7 +176,7 @@ Granular.interactWalls!(sim) | |
@test sim.grains[1].force[1] > 0. | |
@test sim.grains[1].force[2] ≈ 0. | |
-Compat.@info "Wall at +x" | |
+@info "Wall at +x" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 1., 2., verbose=false) | |
t@@ -188,7 +188,7 @@ Granular.interactWalls!(sim) | |
@test sim.grains[1].force[1] < 0. | |
@test sim.grains[1].force[2] ≈ 0. | |
-Compat.@info "Wall at -y" | |
+@info "Wall at -y" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 1., 2., verbose=false) | |
t@@ -200,7 +200,7 @@ Granular.interactWalls!(sim) | |
@test sim.grains[1].force[1] ≈ 0. | |
@test sim.grains[1].force[2] > 0. | |
-Compat.@info "Wall at +y" | |
+@info "Wall at +y" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 1., 2., verbose=false) | |
t@@ -212,7 +212,7 @@ Granular.interactWalls!(sim) | |
@test sim.grains[1].force[1] ≈ 0. | |
@test sim.grains[1].force[2] < 0. | |
-Compat.@info "Full collision with wall" | |
+@info "Full collision with wall" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [1.2, 0.5], 1., 2., verbose=false) | |
t@@ -242,9 +242,9 @@ Granular.run!(sim) | |
@test sim.grains[1].lin_vel[2] ≈ 0. | |
-Compat.@info "# Testing wall dynamics" | |
+@info "# Testing wall dynamics" | |
-Compat.@info "Wall present, no contact, fixed (default)" | |
+@info "Wall present, no contact, fixed (default)" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 1., 1.], 1., 2., verbose=false) | |
t@@ -259,7 +259,7 @@ Granular.updateWallKinematics!(sim) | |
@test sim.grains[1].force[1] ≈ 0. | |
@test sim.grains[1].force[2] ≈ 0. | |
-Compat.@info "Wall present, no contact, fixed (TY2)" | |
+@info "Wall present, no contact, fixed (TY2)" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 1., 1.], 1., 2., verbose=false) | |
t@@ -274,7 +274,7 @@ Granular.updateWallKinematics!(sim, method="Two-term Taylo… | |
@test sim.grains[1].force[1] ≈ 0. | |
@test sim.grains[1].force[2] ≈ 0. | |
-Compat.@info "Wall present, no contact, fixed (TY3)" | |
+@info "Wall present, no contact, fixed (TY3)" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 1., 1.], 1., 2., verbose=false) | |
t@@ -290,7 +290,7 @@ Granular.updateWallKinematics!(sim, method="Three-term Tay… | |
@test sim.grains[1].force[1] ≈ 0. | |
@test sim.grains[1].force[2] ≈ 0. | |
-Compat.@info "Wall present, contact, fixed" | |
+@info "Wall present, contact, fixed" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 1., 1.], 1., 2., verbose=false) | |
t@@ -302,7 +302,7 @@ Granular.updateWallKinematics!(sim) | |
@test sim.walls[1].vel ≈ 0. | |
@test sim.walls[1].pos ≈ -0.01 | |
-Compat.@info "Wall present, no contact, velocity BC" | |
+@info "Wall present, no contact, velocity BC" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 1., 1.], 1., 2., verbose=false) | |
t@@ -319,7 +319,7 @@ Granular.updateWallKinematics!(sim) | |
@test sim.grains[1].force[1] ≈ 0. | |
@test sim.grains[1].force[2] ≈ 0. | |
-Compat.@info "Wall present, no contact, velocity BC (TY2)" | |
+@info "Wall present, no contact, velocity BC (TY2)" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 1., 1.], 1., 2., verbose=false) | |
t@@ -336,7 +336,7 @@ Granular.updateWallKinematics!(sim, method="Two-term Taylo… | |
@test sim.grains[1].force[1] ≈ 0. | |
@test sim.grains[1].force[2] ≈ 0. | |
-Compat.@info "Wall present, no contact, velocity BC (TY3)" | |
+@info "Wall present, no contact, velocity BC (TY3)" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 1., 1.], 1., 2., verbose=false) | |
t@@ -354,7 +354,7 @@ Granular.updateWallKinematics!(sim, method="Three-term Tay… | |
@test sim.grains[1].force[1] ≈ 0. | |
@test sim.grains[1].force[2] ≈ 0. | |
-Compat.@info "Wall present, contact, velocity BC (TY2)" | |
+@info "Wall present, contact, velocity BC (TY2)" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 1., 1.], 1., 2., verbose=false) | |
t@@ -369,7 +369,7 @@ Granular.updateWallKinematics!(sim, method="Two-term Taylo… | |
@test sim.walls[1].vel ≈ 1. | |
@test sim.walls[1].pos > -0.9 | |
-Compat.@info "Wall present, contact, velocity BC (TY2)" | |
+@info "Wall present, contact, velocity BC (TY2)" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [10., 20., 1.0]) | |
Granular.addGrainCylindrical!(sim, [ 1., 1.], 1., 2., verbose=false) | |
t@@ -383,7 +383,7 @@ Granular.updateWallKinematics!(sim, method="Two-term Taylo… | |
@test sim.walls[1].vel ≈ 1. | |
@test sim.walls[1].pos > -0.9 | |
-Compat.@info "Wall present, contact, normal stress BC" | |
+@info "Wall present, contact, normal stress BC" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [2., 2., 1.]) | |
Granular.addGrainCylindrical!(sim, [ 1., 1.], 1., 1., verbose=false) | |
t@@ -400,7 +400,7 @@ Granular.updateWallKinematics!(sim) | |
@test sim.grains[1].force[1] ≈ 0. | |
@test sim.grains[1].force[2] ≈ 0. | |
-Compat.@info "Wall present, contact, normal stress BC" | |
+@info "Wall present, contact, normal stress BC" | |
sim = Granular.createSimulation() | |
sim.ocean = Granular.createRegularOceanGrid([1, 1, 1], [2., 2., 1.]) | |
Granular.addGrainCylindrical!(sim, [ 1., 1.], 1., 1., verbose=false) | |
t@@ -428,7 +428,7 @@ for i=1:5 | |
@test sim.grains[1].force[2] ≈ 0. | |
end | |
-Compat.@info "Granular packing, wall present, normal stress BC" | |
+@info "Granular packing, wall present, normal stress BC" | |
sim = Granular.createSimulation() | |
Granular.regularPacking!(sim, [5, 5], 1.0, 2.0) | |
Granular.fitGridToGrains!(sim, sim.ocean) |