Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/volumeops/derivatives/second_derivative_test.jl @ 2096:5af7534e5b3c feature/sbp_operators/laplace_curvilinear tip
Merge default
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Mon, 02 Mar 2026 15:58:27 +0100 |
| parents | e21c295fb2da |
| children |
comparison
equal
deleted
inserted
replaced
| 2082:87157cfca640 | 2096:5af7534e5b3c |
|---|---|
| 19 g_2D = equidistant_grid((0.0, 0.0), (Lx, Ly), 121, 123) | 19 g_2D = equidistant_grid((0.0, 0.0), (Lx, Ly), 121, 123) |
| 20 | 20 |
| 21 @testset "Constructors" begin | 21 @testset "Constructors" begin |
| 22 @testset "1D" begin | 22 @testset "1D" begin |
| 23 Dₓₓ = second_derivative(g_1D, stencil_set) | 23 Dₓₓ = second_derivative(g_1D, stencil_set) |
| 24 @test Dₓₓ == second_derivative(g_1D, stencil_set, 1) | |
| 24 @test Dₓₓ == second_derivative(g_1D, inner_stencil, closure_stencils) | 25 @test Dₓₓ == second_derivative(g_1D, inner_stencil, closure_stencils) |
| 25 @test Dₓₓ isa LazyTensor{Float64,1,1} | 26 @test Dₓₓ isa LazyTensor{Float64,1,1} |
| 27 | |
| 28 @test_throws DomainError(3, "Derivative direction must be 1.") second_derivative(g_1D, stencil_set, 3) | |
| 26 end | 29 end |
| 27 @testset "2D" begin | 30 @testset "2D" begin |
| 28 Dₓₓ = second_derivative(g_2D,stencil_set,1) | 31 Dₓₓ = second_derivative(g_2D,stencil_set,1) |
| 29 @test Dₓₓ isa LazyTensor{Float64,2,2} | 32 @test Dₓₓ isa LazyTensor{Float64,2,2} |
| 33 | |
| 34 | |
| 35 @test_throws DomainError(3, "Derivative direction must be in 1:2.") second_derivative(g_2D, stencil_set, 3) | |
| 30 end | 36 end |
| 31 end | 37 end |
| 32 | 38 |
| 33 # Exact differentiation is measured point-wise. In other cases | 39 # Exact differentiation is measured point-wise. In other cases |
| 34 # the error is measured in the l2-norm. | 40 # the error is measured in the l2-norm. |
