Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/boundaryops/boundary_restriction_test.jl @ 950:97e9a8337a86 feature/laplace_opset
Review: broadcast instead of map in some places
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 14 Mar 2022 08:06:50 +0100 |
parents | 7168d28b03e3 |
children | 775d5513da8f |
comparison
equal
deleted
inserted
replaced
949:7168d28b03e3 | 950:97e9a8337a86 |
---|---|
37 | 37 |
38 @testset "Application" begin | 38 @testset "Application" begin |
39 @testset "1D" begin | 39 @testset "1D" begin |
40 e_l, e_r = | 40 e_l, e_r = |
41 map(id -> boundary_restriction(g_1D, e_closure, id), boundary_identifiers(g_1D)) | 41 map(id -> boundary_restriction(g_1D, e_closure, id), boundary_identifiers(g_1D)) |
42 # REVIEW: Same as normal_derivative:45 | |
42 | 43 |
43 v = evalOn(g_1D,x->1+x^2) | 44 v = evalOn(g_1D,x->1+x^2) |
44 u = fill(3.124) | 45 u = fill(3.124) |
45 | 46 |
46 @test (e_l*v)[] == v[1] | 47 @test (e_l*v)[] == v[1] |
49 end | 50 end |
50 | 51 |
51 @testset "2D" begin | 52 @testset "2D" begin |
52 e_w, e_e, e_s, e_n = | 53 e_w, e_e, e_s, e_n = |
53 map(id -> boundary_restriction(g_2D, e_closure, id), boundary_identifiers(g_2D)) | 54 map(id -> boundary_restriction(g_2D, e_closure, id), boundary_identifiers(g_2D)) |
55 # REVIEW: Same as normal_derivative:45 | |
54 | 56 |
55 v = rand(11, 15) | 57 v = rand(11, 15) |
56 u = fill(3.124) | 58 u = fill(3.124) |
57 | 59 |
58 @test e_w*v == v[1,:] | 60 @test e_w*v == v[1,:] |