Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/boundaryops/boundary_operator_test.jl @ 995:1ba8a398af9c refactor/lazy_tensors
Rename types
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 18 Mar 2022 21:14:47 +0100 |
parents | 5be8e25c81b3 |
children | 6abbb2c6c3e4 05a25a5063bb |
comparison
equal
deleted
inserted
replaced
994:55ab7801c45f | 995:1ba8a398af9c |
---|---|
16 @testset "Constructors" begin | 16 @testset "Constructors" begin |
17 @testset "1D" begin | 17 @testset "1D" begin |
18 op_l = BoundaryOperator{Lower}(closure_stencil,size(g_1D)[1]) | 18 op_l = BoundaryOperator{Lower}(closure_stencil,size(g_1D)[1]) |
19 @test op_l == BoundaryOperator(g_1D,closure_stencil,Lower()) | 19 @test op_l == BoundaryOperator(g_1D,closure_stencil,Lower()) |
20 @test op_l == boundary_operator(g_1D,closure_stencil,CartesianBoundary{1,Lower}()) | 20 @test op_l == boundary_operator(g_1D,closure_stencil,CartesianBoundary{1,Lower}()) |
21 @test op_l isa TensorMapping{T,0,1} where T | 21 @test op_l isa LazyTensor{T,0,1} where T |
22 | 22 |
23 op_r = BoundaryOperator{Upper}(closure_stencil,size(g_1D)[1]) | 23 op_r = BoundaryOperator{Upper}(closure_stencil,size(g_1D)[1]) |
24 @test op_r == BoundaryOperator(g_1D,closure_stencil,Upper()) | 24 @test op_r == BoundaryOperator(g_1D,closure_stencil,Upper()) |
25 @test op_r == boundary_operator(g_1D,closure_stencil,CartesianBoundary{1,Upper}()) | 25 @test op_r == boundary_operator(g_1D,closure_stencil,CartesianBoundary{1,Upper}()) |
26 @test op_r isa TensorMapping{T,0,1} where T | 26 @test op_r isa LazyTensor{T,0,1} where T |
27 end | 27 end |
28 | 28 |
29 @testset "2D" begin | 29 @testset "2D" begin |
30 e_w = boundary_operator(g_2D,closure_stencil,CartesianBoundary{1,Upper}()) | 30 e_w = boundary_operator(g_2D,closure_stencil,CartesianBoundary{1,Upper}()) |
31 @test e_w isa InflatedTensorMapping | 31 @test e_w isa InflatedLazyTensor |
32 @test e_w isa TensorMapping{T,1,2} where T | 32 @test e_w isa LazyTensor{T,1,2} where T |
33 end | 33 end |
34 end | 34 end |
35 op_l, op_r = boundary_operator.(Ref(g_1D), Ref(closure_stencil), boundary_identifiers(g_1D)) | 35 op_l, op_r = boundary_operator.(Ref(g_1D), Ref(closure_stencil), boundary_identifiers(g_1D)) |
36 op_w, op_e, op_s, op_n = boundary_operator.(Ref(g_2D), Ref(closure_stencil), boundary_identifiers(g_2D)) | 36 op_w, op_e, op_s, op_n = boundary_operator.(Ref(g_2D), Ref(closure_stencil), boundary_identifiers(g_2D)) |
37 | 37 |