Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/volumeops/volume_operator_test.jl @ 1109:69c635e1d346 refactor/sbpoperators/inflation
Rename g_1D and remove nested testset
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 09 Jun 2022 07:33:27 +0200 |
parents | 0ba4609605d4 |
children | 56bc2c6a17fd |
comparison
equal
deleted
inserted
replaced
1108:6b24dc2d7b11 | 1109:69c635e1d346 |
---|---|
14 # change testset Regions and testset Inferred, to test the 1D operators. | 14 # change testset Regions and testset Inferred, to test the 1D operators. |
15 | 15 |
16 @testset "VolumeOperator" begin | 16 @testset "VolumeOperator" begin |
17 inner_stencil = CenteredStencil(1/4, 2/4, 1/4) | 17 inner_stencil = CenteredStencil(1/4, 2/4, 1/4) |
18 closure_stencils = (Stencil(1/2, 1/2; center=1), Stencil(0.,1.; center=2)) | 18 closure_stencils = (Stencil(1/2, 1/2; center=1), Stencil(0.,1.; center=2)) |
19 g_1D = EquidistantGrid(11,0.,1.) | 19 g = EquidistantGrid(11,0.,1.) |
20 @testset "Constructors" begin | 20 @testset "Constructors" begin |
21 op = VolumeOperator(inner_stencil,closure_stencils,(11,),even) | 21 op = VolumeOperator(inner_stencil,closure_stencils,(11,),even) |
22 @test op == VolumeOperator(g_1D,inner_stencil,closure_stencils,even) | 22 @test op == VolumeOperator(g,inner_stencil,closure_stencils,even) |
23 @test op isa LazyTensor{T,1,1} where T | 23 @test op isa LazyTensor{T,1,1} where T |
24 end | 24 end |
25 | 25 |
26 @testset "Sizes" begin | 26 @testset "Sizes" begin |
27 @testset "1D" begin | 27 op = VolumeOperator(g,inner_stencil,closure_stencils,even) |
28 op = VolumeOperator(g_1D,inner_stencil,closure_stencils,even) | 28 @test range_size(op) == domain_size(op) == size(g) |
29 @test range_size(op) == domain_size(op) == size(g_1D) | |
30 end | |
31 end | 29 end |
32 | 30 |
33 # op_x = volume_operator(g_2D,inner_stencil,closure_stencils,even,1) | 31 # op_x = volume_operator(g_2D,inner_stencil,closure_stencils,even,1) |
34 # op_y = volume_operator(g_2D,inner_stencil,closure_stencils,odd,2) | 32 # op_y = volume_operator(g_2D,inner_stencil,closure_stencils,odd,2) |
35 # v = zeros(size(g_2D)) | 33 # v = zeros(size(g_2D)) |