Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/boundaryops/boundary_operator_test.jl @ 1154:ae006e844870 refactor/sbpoperators/inflation
Remove convenience constructor for BoundaryOperator according to review comments
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 01 Nov 2022 22:10:51 +0100 |
parents | f1bb1b6d85dd |
children | 1cc45207817e 102ebdaf7c11 |
comparison
equal
deleted
inserted
replaced
1153:f1bb1b6d85dd | 1154:ae006e844870 |
---|---|
12 closure_stencil = Stencil(2.,1.,3.; center = 1) | 12 closure_stencil = Stencil(2.,1.,3.; center = 1) |
13 g_1D = EquidistantGrid(11, 0.0, 1.0) | 13 g_1D = EquidistantGrid(11, 0.0, 1.0) |
14 g_2D = EquidistantGrid((11,15), (0.0, 0.0), (1.0,1.0)) | 14 g_2D = EquidistantGrid((11,15), (0.0, 0.0), (1.0,1.0)) |
15 | 15 |
16 @testset "Constructors" begin | 16 @testset "Constructors" begin |
17 # Review: Remove the first line below in case we remove convenience constructor in BoundaryOperator | 17 @test BoundaryOperator(g_1D, closure_stencil, Lower()) isa LazyTensor{T,0,1} where T |
18 op_l = BoundaryOperator{Lower}(closure_stencil,size(g_1D)[1]) | 18 @test BoundaryOperator(g_1D, closure_stencil, Upper()) isa LazyTensor{T,0,1} where T |
19 @test op_l == BoundaryOperator(g_1D,closure_stencil,Lower()) | |
20 @test op_l isa LazyTensor{T,0,1} where T | |
21 # Review: Remove the first line below in case we remove convenience constructor in BoundaryOperator | |
22 op_r = BoundaryOperator{Upper}(closure_stencil,size(g_1D)[1]) | |
23 @test op_r == BoundaryOperator(g_1D,closure_stencil,Upper()) | |
24 @test op_r isa LazyTensor{T,0,1} where T | |
25 end | 19 end |
26 | 20 |
27 op_l = BoundaryOperator(g_1D, closure_stencil, Lower()) | 21 op_l = BoundaryOperator(g_1D, closure_stencil, Lower()) |
28 op_r = BoundaryOperator(g_1D, closure_stencil, Upper()) | 22 op_r = BoundaryOperator(g_1D, closure_stencil, Upper()) |
29 | 23 |