Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/volumeops/laplace/laplace_test.jl @ 872:6a4d36eccf39 feature/laplace_opset
REVIEW: Add some comments about the tests
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 25 Jan 2022 10:36:13 +0100 |
parents | 1784b1c0af3e |
children | 12e8e431b43c |
comparison
equal
deleted
inserted
replaced
871:86776d06b883 | 872:6a4d36eccf39 |
---|---|
42 | 42 |
43 L = Laplace(g_1D, operator_path; order=4) | 43 L = Laplace(g_1D, operator_path; order=4) |
44 @test L == Laplace(Δ, H, Hi, e_dict, d_dict, Hb_dict) | 44 @test L == Laplace(Δ, H, Hi, e_dict, d_dict, Hb_dict) |
45 @test L isa TensorMapping{T,1,1} where T | 45 @test L isa TensorMapping{T,1,1} where T |
46 @inferred Laplace(Δ, H, Hi, e_dict, d_dict, Hb_dict) | 46 @inferred Laplace(Δ, H, Hi, e_dict, d_dict, Hb_dict) |
47 # REVIEW: The tests above seem very tied to the implementation. Is | |
48 # it important that the components of the operator set are stored | |
49 # in static dicts? Is something like below better? | |
50 # | |
51 # ``` | |
52 # L = Laplace(g_1D, operator_path; order=4) | |
53 # @test L isa TensorMapping{T,1,1} where T | |
54 # @test boundary_restriction(L,id_l) == boundary_restriction(g_1D, e_closure,id_l) | |
55 # ... | |
56 # ``` | |
57 # I guess this is more or less simply a reorganization of the test and skipping testing for the struct layout | |
47 end | 58 end |
48 @testset "3D" begin | 59 @testset "3D" begin |
49 Δ = laplace(g_3D, inner_stencil, closure_stencils) | 60 Δ = laplace(g_3D, inner_stencil, closure_stencils) |
50 H = inner_product(g_3D, quadrature_interior, quadrature_closure) | 61 H = inner_product(g_3D, quadrature_interior, quadrature_closure) |
51 Hi = inverse_inner_product(g_3D, quadrature_interior, quadrature_closure) | 62 Hi = inverse_inner_product(g_3D, quadrature_interior, quadrature_closure) |
86 @test L isa TensorMapping{T,3,3} where T | 97 @test L isa TensorMapping{T,3,3} where T |
87 @inferred Laplace(Δ,H,Hi,e_dict,d_dict,Hb_dict) | 98 @inferred Laplace(Δ,H,Hi,e_dict,d_dict,Hb_dict) |
88 end | 99 end |
89 end | 100 end |
90 | 101 |
102 # REVIEW: Is this testset misplaced? Should it really be inside the "Laplace" testset? | |
91 @testset "laplace" begin | 103 @testset "laplace" begin |
92 @testset "1D" begin | 104 @testset "1D" begin |
93 L = laplace(g_1D, inner_stencil, closure_stencils) | 105 L = laplace(g_1D, inner_stencil, closure_stencils) |
94 @test L == second_derivative(g_1D, inner_stencil, closure_stencils) | 106 @test L == second_derivative(g_1D, inner_stencil, closure_stencils) |
95 @test L isa TensorMapping{T,1,1} where T | 107 @test L isa TensorMapping{T,1,1} where T |