Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/volumeops/volume_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 | 469ed954b493 |
children | 05a25a5063bb |
comparison
equal
deleted
inserted
replaced
994:55ab7801c45f | 995:1ba8a398af9c |
---|---|
20 @testset "Constructors" begin | 20 @testset "Constructors" begin |
21 @testset "1D" begin | 21 @testset "1D" begin |
22 op = VolumeOperator(inner_stencil,closure_stencils,(11,),even) | 22 op = VolumeOperator(inner_stencil,closure_stencils,(11,),even) |
23 @test op == VolumeOperator(g_1D,inner_stencil,closure_stencils,even) | 23 @test op == VolumeOperator(g_1D,inner_stencil,closure_stencils,even) |
24 @test op == volume_operator(g_1D,inner_stencil,closure_stencils,even,1) | 24 @test op == volume_operator(g_1D,inner_stencil,closure_stencils,even,1) |
25 @test op isa TensorMapping{T,1,1} where T | 25 @test op isa LazyTensor{T,1,1} where T |
26 end | 26 end |
27 @testset "2D" begin | 27 @testset "2D" begin |
28 op_x = volume_operator(g_2D,inner_stencil,closure_stencils,even,1) | 28 op_x = volume_operator(g_2D,inner_stencil,closure_stencils,even,1) |
29 op_y = volume_operator(g_2D,inner_stencil,closure_stencils,even,2) | 29 op_y = volume_operator(g_2D,inner_stencil,closure_stencils,even,2) |
30 Ix = IdentityMapping{Float64}((11,)) | 30 Ix = IdentityTensor{Float64}((11,)) |
31 Iy = IdentityMapping{Float64}((12,)) | 31 Iy = IdentityTensor{Float64}((12,)) |
32 @test op_x == VolumeOperator(inner_stencil,closure_stencils,(11,),even)⊗Iy | 32 @test op_x == VolumeOperator(inner_stencil,closure_stencils,(11,),even)⊗Iy |
33 @test op_y == Ix⊗VolumeOperator(inner_stencil,closure_stencils,(12,),even) | 33 @test op_y == Ix⊗VolumeOperator(inner_stencil,closure_stencils,(12,),even) |
34 @test op_x isa TensorMapping{T,2,2} where T | 34 @test op_x isa LazyTensor{T,2,2} where T |
35 @test op_y isa TensorMapping{T,2,2} where T | 35 @test op_y isa LazyTensor{T,2,2} where T |
36 end | 36 end |
37 @testset "3D" begin | 37 @testset "3D" begin |
38 op_x = volume_operator(g_3D,inner_stencil,closure_stencils,even,1) | 38 op_x = volume_operator(g_3D,inner_stencil,closure_stencils,even,1) |
39 op_y = volume_operator(g_3D,inner_stencil,closure_stencils,even,2) | 39 op_y = volume_operator(g_3D,inner_stencil,closure_stencils,even,2) |
40 op_z = volume_operator(g_3D,inner_stencil,closure_stencils,even,3) | 40 op_z = volume_operator(g_3D,inner_stencil,closure_stencils,even,3) |
41 Ix = IdentityMapping{Float64}((11,)) | 41 Ix = IdentityTensor{Float64}((11,)) |
42 Iy = IdentityMapping{Float64}((12,)) | 42 Iy = IdentityTensor{Float64}((12,)) |
43 Iz = IdentityMapping{Float64}((10,)) | 43 Iz = IdentityTensor{Float64}((10,)) |
44 @test op_x == VolumeOperator(inner_stencil,closure_stencils,(11,),even)⊗Iy⊗Iz | 44 @test op_x == VolumeOperator(inner_stencil,closure_stencils,(11,),even)⊗Iy⊗Iz |
45 @test op_y == Ix⊗VolumeOperator(inner_stencil,closure_stencils,(12,),even)⊗Iz | 45 @test op_y == Ix⊗VolumeOperator(inner_stencil,closure_stencils,(12,),even)⊗Iz |
46 @test op_z == Ix⊗Iy⊗VolumeOperator(inner_stencil,closure_stencils,(10,),even) | 46 @test op_z == Ix⊗Iy⊗VolumeOperator(inner_stencil,closure_stencils,(10,),even) |
47 @test op_x isa TensorMapping{T,3,3} where T | 47 @test op_x isa LazyTensor{T,3,3} where T |
48 @test op_y isa TensorMapping{T,3,3} where T | 48 @test op_y isa LazyTensor{T,3,3} where T |
49 @test op_z isa TensorMapping{T,3,3} where T | 49 @test op_z isa LazyTensor{T,3,3} where T |
50 end | 50 end |
51 end | 51 end |
52 | 52 |
53 @testset "Sizes" begin | 53 @testset "Sizes" begin |
54 @testset "1D" begin | 54 @testset "1D" begin |