tAdd test coverage of wall area and stress calculations and error handling - Granular.jl - Julia package for granular dynamics simulation
 (HTM) git clone git://src.adamsgaard.dk/Granular.jl
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 713455f462ecb5e74b9b719f66a72d13fc60b16b
 (DIR) parent 865d9373d7a5e7c6f41af661c1106c8bcf1a47e7
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       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(-)
       ---
 (DIR) diff --git a/test/wall.jl b/test/wall.jl
       t@@ -50,6 +50,16 @@ Granular.addWallLinearFrictionless!(sim, [0., 1.], 1., verbose=false)
        @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/(20.0*2.0)
       +@test_throws ErrorException Granular.getWallNormalStress(sim, 1, stress_type="nonexistent")
       +
       +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"