Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/volumeops/derivatives/second_derivative_test.jl @ 2091:e21c295fb2da refactor/sbp_operators/direction_check
Restructure methods for equidistant grids with a dim argument
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Mon, 02 Mar 2026 15:41:14 +0100 |
| parents | 67d8fbbb9e58 |
| children |
comparison
equal
deleted
inserted
replaced
| 2090:67d8fbbb9e58 | 2091:e21c295fb2da |
|---|---|
| 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, stencil_set, 1) |
| 25 @test Dₓₓ == second_derivative(g_1D, inner_stencil, closure_stencils) | 25 @test Dₓₓ == second_derivative(g_1D, inner_stencil, closure_stencils) |
| 26 @test Dₓₓ isa LazyTensor{Float64,1,1} | 26 @test Dₓₓ isa LazyTensor{Float64,1,1} |
| 27 | 27 |
| 28 @test_throws DomainError(3, "Derivative direction must be in 1:1.") second_derivative(g_1D, stencil_set, 3) | 28 @test_throws DomainError(3, "Derivative direction must be 1.") second_derivative(g_1D, stencil_set, 3) |
| 29 end | 29 end |
| 30 @testset "2D" begin | 30 @testset "2D" begin |
| 31 Dₓₓ = second_derivative(g_2D,stencil_set,1) | 31 Dₓₓ = second_derivative(g_2D,stencil_set,1) |
| 32 @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) | |
| 33 end | 36 end |
| 34 end | 37 end |
| 35 | 38 |
| 36 # Exact differentiation is measured point-wise. In other cases | 39 # Exact differentiation is measured point-wise. In other cases |
| 37 # the error is measured in the l2-norm. | 40 # the error is measured in the l2-norm. |
