Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/boundaryops/boundary_operator_test.jl @ 1101:1e8270c18edb feature/lazy_tensors/pretty_printing
Merge default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 12 May 2022 21:52:47 +0200 |
parents | a76830879c63 |
children | 0b0444adacd3 157a78959e5d |
comparison
equal
deleted
inserted
replaced
1014:67969bd7e642 | 1101:1e8270c18edb |
---|---|
7 import Sbplib.SbpOperators.Stencil | 7 import Sbplib.SbpOperators.Stencil |
8 import Sbplib.SbpOperators.BoundaryOperator | 8 import Sbplib.SbpOperators.BoundaryOperator |
9 import Sbplib.SbpOperators.boundary_operator | 9 import Sbplib.SbpOperators.boundary_operator |
10 | 10 |
11 @testset "BoundaryOperator" begin | 11 @testset "BoundaryOperator" begin |
12 closure_stencil = Stencil((0,2), (2.,1.,3.)) | 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 @testset "1D" begin | 17 @testset "1D" begin |
26 @test op_r isa LazyTensor{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 InflatedLazyTensor | 31 @test e_w isa InflatedTensor |
32 @test e_w isa LazyTensor{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)) |