Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/boundaryops/boundary_operator_test.jl @ 1672:3714a391545a refactor/grids/boundary_identifiers_1d
Make the boundary identifiers for EquidistantGrid subtype BoundaryIdentifer
author | Vidar Stiernström <vidar.stiernstrom@gmail.com> |
---|---|
date | Sun, 07 Jul 2024 15:15:12 -0700 |
parents | 4684c7f1c4cb |
children | 471a948cd2b2 |
comparison
equal
deleted
inserted
replaced
1671:791d0f3f289a | 1672:3714a391545a |
---|---|
11 @testset "BoundaryOperator" begin | 11 @testset "BoundaryOperator" begin |
12 closure_stencil = Stencil(2.,1.,3.; center = 1) | 12 closure_stencil = Stencil(2.,1.,3.; center = 1) |
13 g_1D = EquidistantGrid(range(0,1,length=11)) | 13 g_1D = EquidistantGrid(range(0,1,length=11)) |
14 | 14 |
15 @testset "Constructors" begin | 15 @testset "Constructors" begin |
16 @test BoundaryOperator(g_1D, closure_stencil, Lower()) isa LazyTensor{T,0,1} where T | 16 @test BoundaryOperator(g_1D, closure_stencil, LowerBoundary()) isa LazyTensor{T,0,1} where T |
17 @test BoundaryOperator(g_1D, closure_stencil, Upper()) isa LazyTensor{T,0,1} where T | 17 @test BoundaryOperator(g_1D, closure_stencil, UpperBoundary()) isa LazyTensor{T,0,1} where T |
18 end | 18 end |
19 | 19 |
20 op_l = BoundaryOperator(g_1D, closure_stencil, Lower()) | 20 op_l = BoundaryOperator(g_1D, closure_stencil, LowerBoundary()) |
21 op_r = BoundaryOperator(g_1D, closure_stencil, Upper()) | 21 op_r = BoundaryOperator(g_1D, closure_stencil, UpperBoundary()) |
22 | 22 |
23 @testset "Sizes" begin | 23 @testset "Sizes" begin |
24 @test domain_size(op_l) == (11,) | 24 @test domain_size(op_l) == (11,) |
25 @test domain_size(op_r) == (11,) | 25 @test domain_size(op_r) == (11,) |
26 | 26 |