comparison test/SbpOperators/volumeops/laplace/laplace_test.jl @ 1559:43e6acbefdd1 feature/sbp_operators/laplace_curvilinear

Rename testsets and add one for mapped grids
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 25 Apr 2024 08:59:45 +0200
parents 43aaf710463e
children f6774e98d223
comparison
equal deleted inserted replaced
1557:9113f437431d 1559:43e6acbefdd1
70 operator_path = sbp_operators_path()*"standard_diagonal.toml" 70 operator_path = sbp_operators_path()*"standard_diagonal.toml"
71 stencil_set = read_stencil_set(operator_path; order=4) 71 stencil_set = read_stencil_set(operator_path; order=4)
72 g_1D = equidistant_grid(0.0, 1., 101) 72 g_1D = equidistant_grid(0.0, 1., 101)
73 g_3D = equidistant_grid((0.0, -1.0, 0.0), (1., 1., 1.), 51, 101, 52) 73 g_3D = equidistant_grid((0.0, -1.0, 0.0), (1., 1., 1.), 51, 101, 52)
74 74
75 @testset "1D" begin 75 @testset "EquidistantGrid" begin
76 Δ = laplace(g_1D, stencil_set) 76 Δ = laplace(g_1D, stencil_set)
77 @test Δ == second_derivative(g_1D, stencil_set) 77 @test Δ == second_derivative(g_1D, stencil_set)
78 @test Δ isa LazyTensor{Float64,1,1} 78 @test Δ isa LazyTensor{Float64,1,1}
79 end 79 end
80 @testset "3D" begin 80 @testset "TensorGrid" begin
81 Δ = laplace(g_3D, stencil_set) 81 Δ = laplace(g_3D, stencil_set)
82 @test Δ isa LazyTensor{Float64,3,3} 82 @test Δ isa LazyTensor{Float64,3,3}
83 Dxx = second_derivative(g_3D, stencil_set, 1) 83 Dxx = second_derivative(g_3D, stencil_set, 1)
84 Dyy = second_derivative(g_3D, stencil_set, 2) 84 Dyy = second_derivative(g_3D, stencil_set, 2)
85 Dzz = second_derivative(g_3D, stencil_set, 3) 85 Dzz = second_derivative(g_3D, stencil_set, 3)
86 @test Δ == Dxx + Dyy + Dzz 86 @test Δ == Dxx + Dyy + Dzz
87 @test Δ isa LazyTensor{Float64,3,3} 87 @test Δ isa LazyTensor{Float64,3,3}
88 end 88 end
89
90 @testset "MappedGrid" begin
91 @test_broken false
92 end
89 end 93 end
90 94