tAdd test coverage of wall area and stress calculations and error handling - Gr… | |
git clone git://src.adamsgaard.dk/Granular.jl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 713455f462ecb5e74b9b719f66a72d13fc60b16b | |
parent 865d9373d7a5e7c6f41af661c1106c8bcf1a47e7 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Wed, 9 May 2018 22:15:39 -0400 | |
Add test coverage of wall area and stress calculations and error handling | |
Diffstat: | |
M test/wall.jl | 10 ++++++++++ | |
1 file changed, 10 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/test/wall.jl b/test/wall.jl | |
t@@ -50,6 +50,16 @@ Granular.addWallLinearFrictionless!(sim, [0., 1.], 1., verb… | |
@test Granular.getWallSurfaceArea(sim, 1) ≈ 20.0*2.0 | |
@test Granular.getWallSurfaceArea(sim, 2) ≈ 10.0*2.0 | |
+sim.walls[1].normal_stress = 1.0 | |
+@test Granular.getWallNormalStress(sim, 1, stress_type="defined") ≈ 1.0 | |
+sim.walls[1].force = 1.0 | |
+@test Granular.getWallNormalStress(sim, 1, stress_type="effective") ≈ 1.0/(2… | |
+@test_throws ErrorException Granular.getWallNormalStress(sim, 1, stress_type="… | |
+ | |
+sim.walls[1].normal = [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" | |
Compat.@info "Wall present but no contact" |