Mercurial > repos > public > sbplib_julia
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 241:1128ab4f5758 | 242:9819243102dd |
|---|---|
| 39 @test collect(e_w'*v) == [10,7,4,1.0,1] | 39 @test collect(e_w'*v) == [10,7,4,1.0,1] |
| 40 @test collect(e_e'*v) == [13,10,7,4,4.0] | 40 @test collect(e_e'*v) == [13,10,7,4,4.0] |
| 41 @test collect(e_s'*v) == [10,11,12,13.0] | 41 @test collect(e_s'*v) == [10,11,12,13.0] |
| 42 @test collect(e_n'*v) == [1,2,3,4.0] | 42 @test collect(e_n'*v) == [1,2,3,4.0] |
| 43 | 43 |
| 44 g_x = [1,2,3,4.0] | |
| 45 g_y = [5,4,3,2,1.0] | |
| 46 | |
| 47 G_w = zeros(Float64, (4,5)) | |
| 48 G_w[1,:] = g_y | |
| 49 | |
| 50 G_e = zeros(Float64, (4,5)) | |
| 51 G_e[4,:] = g_y | |
| 52 | |
| 53 G_s = zeros(Float64, (4,5)) | |
| 54 G_s[:,1] = g_x | |
| 55 | |
| 56 G_n = zeros(Float64, (4,5)) | |
| 57 G_n[:,5] = g_x | |
| 58 | |
| 59 @test collect(e_w*g_y) == G_w | |
| 60 @test collect(e_e*g_y) == G_e | |
| 61 @test collect(e_s*g_x) == G_s | |
| 62 @test collect(e_n*g_x) == G_n | |
| 63 | |
| 44 end | 64 end |
