comparison test/SbpOperators/volumeops/laplace/laplace_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 47425442bbc5
children 7fc8df5157a7
comparison
equal deleted inserted replaced
994:55ab7801c45f 995:1ba8a398af9c
15 @testset "Laplace" begin 15 @testset "Laplace" begin
16 @testset "Constructors" begin 16 @testset "Constructors" begin
17 @testset "1D" begin 17 @testset "1D" begin
18 Δ = laplace(g_1D, inner_stencil, closure_stencils) 18 Δ = laplace(g_1D, inner_stencil, closure_stencils)
19 @test Laplace(g_1D, stencil_set) == Laplace(Δ, stencil_set) 19 @test Laplace(g_1D, stencil_set) == Laplace(Δ, stencil_set)
20 @test Laplace(g_1D, stencil_set) isa TensorMapping{T,1,1} where T 20 @test Laplace(g_1D, stencil_set) isa LazyTensor{T,1,1} where T
21 end 21 end
22 @testset "3D" begin 22 @testset "3D" begin
23 Δ = laplace(g_3D, inner_stencil, closure_stencils) 23 Δ = laplace(g_3D, inner_stencil, closure_stencils)
24 @test Laplace(g_3D, stencil_set) == Laplace(Δ,stencil_set) 24 @test Laplace(g_3D, stencil_set) == Laplace(Δ,stencil_set)
25 @test Laplace(g_3D, stencil_set) isa TensorMapping{T,3,3} where T 25 @test Laplace(g_3D, stencil_set) isa LazyTensor{T,3,3} where T
26 end 26 end
27 end 27 end
28 28
29 # Exact differentiation is measured point-wise. In other cases 29 # Exact differentiation is measured point-wise. In other cases
30 # the error is measured in the l2-norm. 30 # the error is measured in the l2-norm.
68 68
69 @testset "laplace" begin 69 @testset "laplace" begin
70 @testset "1D" begin 70 @testset "1D" begin
71 Δ = laplace(g_1D, inner_stencil, closure_stencils) 71 Δ = laplace(g_1D, inner_stencil, closure_stencils)
72 @test Δ == second_derivative(g_1D, inner_stencil, closure_stencils) 72 @test Δ == second_derivative(g_1D, inner_stencil, closure_stencils)
73 @test Δ isa TensorMapping{T,1,1} where T 73 @test Δ isa LazyTensor{T,1,1} where T
74 end 74 end
75 @testset "3D" begin 75 @testset "3D" begin
76 Δ = laplace(g_3D, inner_stencil, closure_stencils) 76 Δ = laplace(g_3D, inner_stencil, closure_stencils)
77 @test Δ isa TensorMapping{T,3,3} where T 77 @test Δ isa LazyTensor{T,3,3} where T
78 Dxx = second_derivative(g_3D, inner_stencil, closure_stencils, 1) 78 Dxx = second_derivative(g_3D, inner_stencil, closure_stencils, 1)
79 Dyy = second_derivative(g_3D, inner_stencil, closure_stencils, 2) 79 Dyy = second_derivative(g_3D, inner_stencil, closure_stencils, 2)
80 Dzz = second_derivative(g_3D, inner_stencil, closure_stencils, 3) 80 Dzz = second_derivative(g_3D, inner_stencil, closure_stencils, 3)
81 @test Δ == Dxx + Dyy + Dzz 81 @test Δ == Dxx + Dyy + Dzz
82 @test Δ isa TensorMapping{T,3,3} where T 82 @test Δ isa LazyTensor{T,3,3} where T
83 end 83 end
84 end 84 end
85 85