Mercurial > repos > public > sbplib_julia
comparison DiffOps/test/runtests.jl @ 284:0b8e041a1873 boundary_conditions
Change how range_size and domain_size work with BoundaryValues and NormalDerivative
Also add a whole bunch of questions and todos
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 18 Jun 2020 22:07:10 +0200 |
parents | 12a12a5cd973 |
children | e21dcda55163 |
comparison
equal
deleted
inserted
replaced
283:12a12a5cd973 | 284:0b8e041a1873 |
---|---|
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) == (4,5) | 132 @test size(e_w*g_y) === (missing,5) |
133 @test size(e_e*g_y) == (4,5) | 133 @test size(e_e*g_y) === (missing,5) |
134 @test size(e_s*g_x) == (4,5) | 134 @test size(e_s*g_x) === (4,missing) |
135 @test size(e_n*g_x) == (4,5) | 135 @test size(e_n*g_x) === (4,missing) |
136 | 136 |
137 @test collect(e_w*g_y) == G_w | 137 # These tests should be moved to where they are possible (i.e we know what the grid should be) |
138 @test collect(e_e*g_y) == G_e | 138 @test_broken collect(e_w*g_y) == G_w |
139 @test collect(e_s*g_x) == G_s | 139 @test_broken collect(e_e*g_y) == G_e |
140 @test collect(e_n*g_x) == G_n | 140 @test_broken collect(e_s*g_x) == G_s |
141 @test_broken collect(e_n*g_x) == G_n | |
141 end | 142 end |
142 | 143 |
143 @testset "NormalDerivative" begin | 144 @testset "NormalDerivative" begin |
144 op = readOperator(sbp_operators_path()*"d2_4th.txt",sbp_operators_path()*"h_4th.txt") | 145 op = readOperator(sbp_operators_path()*"d2_4th.txt",sbp_operators_path()*"h_4th.txt") |
145 g = EquidistantGrid((5,6), (0.0, 0.0), (4.0,5.0)) | 146 g = EquidistantGrid((5,6), (0.0, 0.0), (4.0,5.0)) |
203 G_e = prod_matrix(d_x_u, g_y) | 204 G_e = prod_matrix(d_x_u, g_y) |
204 G_s = prod_matrix(g_x, d_y_l) | 205 G_s = prod_matrix(g_x, d_y_l) |
205 G_n = prod_matrix(g_x, d_y_u) | 206 G_n = prod_matrix(g_x, d_y_u) |
206 | 207 |
207 | 208 |
208 @test size(d_w*g_y) == (5,6) | 209 @test size(d_w*g_y) === (missing,6) |
209 @test size(d_e*g_y) == (5,6) | 210 @test size(d_e*g_y) === (missing,6) |
210 @test size(d_s*g_x) == (5,6) | 211 @test size(d_s*g_x) === (5,missing) |
211 @test size(d_n*g_x) == (5,6) | 212 @test size(d_n*g_x) === (5,missing) |
212 | 213 |
213 @test collect(d_w*g_y) ≈ G_w | 214 # These tests should be moved to where they are possible (i.e we know what the grid should be) |
214 @test collect(d_e*g_y) ≈ G_e | 215 @test_broken collect(d_w*g_y) ≈ G_w |
215 @test collect(d_s*g_x) ≈ G_s | 216 @test_broken collect(d_e*g_y) ≈ G_e |
216 @test collect(d_n*g_x) ≈ G_n | 217 @test_broken collect(d_s*g_x) ≈ G_s |
218 @test_broken collect(d_n*g_x) ≈ G_n | |
217 end | 219 end |
218 | 220 |
219 @testset "BoundaryQuadrature" begin | 221 @testset "BoundaryQuadrature" begin |
220 op = readOperator(sbp_operators_path()*"d2_4th.txt",sbp_operators_path()*"h_4th.txt") | 222 op = readOperator(sbp_operators_path()*"d2_4th.txt",sbp_operators_path()*"h_4th.txt") |
221 g = EquidistantGrid((10,11), (0.0, 0.0), (1.0,1.0)) | 223 g = EquidistantGrid((10,11), (0.0, 0.0), (1.0,1.0)) |