tAdd further reporting during grain plotting tests - Granular.jl - Julia packag… | |
git clone git://src.adamsgaard.dk/Granular.jl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit c18be91176be3f0169e4d9d11f501e14d1652c7d | |
parent 86027ed7180241fba3e5e0003cdc99b10e9b4607 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Wed, 9 May 2018 16:59:20 -0400 | |
Add further reporting during grain plotting tests | |
Diffstat: | |
M test/grain.jl | 28 ++++++++++++++++++++++++++-- | |
1 file changed, 26 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/test/grain.jl b/test/grain.jl | |
t@@ -29,6 +29,7 @@ sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 10., 1., verbose=false) | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 10., 1., verbose=false) | |
Granular.compareGrains(sim.grains[1], sim.grains[2]) | |
+Granular.findContacts!(sim) | |
global gnuplot = true | |
try | |
t@@ -44,15 +45,38 @@ if gnuplot | |
Granular.plotGrainSizeDistribution(sim) | |
@test isfile("test-grain-size-distribution.png") | |
rm("test-grain-size-distribution.png") | |
+ | |
Granular.plotGrainSizeDistribution(sim, skip_fixed=false) | |
@test isfile("test-grain-size-distribution.png") | |
rm("test-grain-size-distribution.png") | |
+ | |
Granular.plotGrainSizeDistribution(sim, size_type="areal") | |
@test isfile("test-grain-size-distribution.png") | |
rm("test-grain-size-distribution.png") | |
+ | |
@test_throws ErrorException Granular.plotGrainSizeDistribution(sim, size_t… | |
- Compat.@info "Testing grain plotting " | |
- Granular.plotGrains(sim) | |
+ | |
+ Compat.@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" | |
+ 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" | |
+ 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" | |
+ 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" | |
+ @test_throws ErrorException Granular.plotGrains(sim, palette_scalar="asdf", | |
+ show_figure=false) | |
end | |
Compat.@info "Testing external body force routines" |