Mercurial > repos > public > sbplib_julia
diff DiffOps/test/runtests.jl @ 242:9819243102dd boundary_conditions
Add test for and fix apply(::BoundaryValue)
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 26 Jun 2019 20:24:21 +0200 |
parents | 60011a10e17d |
children | a827568fc251 |
line wrap: on
line diff
--- a/DiffOps/test/runtests.jl Wed Jun 26 20:23:23 2019 +0200 +++ b/DiffOps/test/runtests.jl Wed Jun 26 20:24:21 2019 +0200 @@ -41,4 +41,24 @@ @test collect(e_s'*v) == [10,11,12,13.0] @test collect(e_n'*v) == [1,2,3,4.0] + g_x = [1,2,3,4.0] + g_y = [5,4,3,2,1.0] + + G_w = zeros(Float64, (4,5)) + G_w[1,:] = g_y + + G_e = zeros(Float64, (4,5)) + G_e[4,:] = g_y + + G_s = zeros(Float64, (4,5)) + G_s[:,1] = g_x + + G_n = zeros(Float64, (4,5)) + G_n[:,5] = g_x + + @test collect(e_w*g_y) == G_w + @test collect(e_e*g_y) == G_e + @test collect(e_s*g_x) == G_s + @test collect(e_n*g_x) == G_n + end