comparison DiffOps/test/runtests.jl @ 285:e21dcda55163 boundary_conditions

Add type representing an unknown dimension in the domain of tensormappings
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Fri, 19 Jun 2020 12:20:31 +0200
parents 0b8e041a1873
children
comparison
equal deleted inserted replaced
284:0b8e041a1873 285:e21dcda55163
127 G_s[:,1] = g_x 127 G_s[:,1] = g_x
128 128
129 G_n = zeros(Float64, (4,5)) 129 G_n = zeros(Float64, (4,5))
130 G_n[:,5] = g_x 130 G_n[:,5] = g_x
131 131
132 @test size(e_w*g_y) === (missing,5) 132 @test size(e_w*g_y) == (UnknownDim,5)
133 @test size(e_e*g_y) === (missing,5) 133 @test size(e_e*g_y) == (UnknownDim,5)
134 @test size(e_s*g_x) === (4,missing) 134 @test size(e_s*g_x) == (4,UnknownDim)
135 @test size(e_n*g_x) === (4,missing) 135 @test size(e_n*g_x) == (4,UnknownDim)
136 136
137 # These tests should be moved to where they are possible (i.e we know what the grid should be) 137 # These tests should be moved to where they are possible (i.e we know what the grid should be)
138 @test_broken collect(e_w*g_y) == G_w 138 @test_broken collect(e_w*g_y) == G_w
139 @test_broken collect(e_e*g_y) == G_e 139 @test_broken collect(e_e*g_y) == G_e
140 @test_broken collect(e_s*g_x) == G_s 140 @test_broken collect(e_s*g_x) == G_s
204 G_e = prod_matrix(d_x_u, g_y) 204 G_e = prod_matrix(d_x_u, g_y)
205 G_s = prod_matrix(g_x, d_y_l) 205 G_s = prod_matrix(g_x, d_y_l)
206 G_n = prod_matrix(g_x, d_y_u) 206 G_n = prod_matrix(g_x, d_y_u)
207 207
208 208
209 @test size(d_w*g_y) === (missing,6) 209 @test size(d_w*g_y) == (UnknownDim,6)
210 @test size(d_e*g_y) === (missing,6) 210 @test size(d_e*g_y) == (UnknownDim,6)
211 @test size(d_s*g_x) === (5,missing) 211 @test size(d_s*g_x) == (5,UnknownDim)
212 @test size(d_n*g_x) === (5,missing) 212 @test size(d_n*g_x) == (5,UnknownDim)
213 213
214 # These tests should be moved to where they are possible (i.e we know what the grid should be) 214 # These tests should be moved to where they are possible (i.e we know what the grid should be)
215 @test_broken collect(d_w*g_y) ≈ G_w 215 @test_broken collect(d_w*g_y) ≈ G_w
216 @test_broken collect(d_e*g_y) ≈ G_e 216 @test_broken collect(d_e*g_y) ≈ G_e
217 @test_broken collect(d_s*g_x) ≈ G_s 217 @test_broken collect(d_s*g_x) ≈ G_s