Mercurial > repos > public > sbplib_julia
diff test/SbpOperators/volumeops/derivatives/second_derivative_test.jl @ 2080:0f949681d3d3 refactor/sbp_operators/direction_check tip
Check that direction of first/second derivative operators is within the dimension of the grid. Add 1D functions for first/second derivative operators that take a direction.
| author | Vidar Stiernström <vidar.stiernstrom@gmail.com> |
|---|---|
| date | Fri, 20 Feb 2026 12:01:05 +0100 |
| parents | 471a948cd2b2 |
| children |
line wrap: on
line diff
--- a/test/SbpOperators/volumeops/derivatives/second_derivative_test.jl Wed Feb 18 21:33:00 2026 +0100 +++ b/test/SbpOperators/volumeops/derivatives/second_derivative_test.jl Fri Feb 20 12:01:05 2026 +0100 @@ -21,8 +21,11 @@ @testset "Constructors" begin @testset "1D" begin Dₓₓ = second_derivative(g_1D, stencil_set) + @test Dₓₓ == second_derivative(g_1D, stencil_set, 1) @test Dₓₓ == second_derivative(g_1D, inner_stencil, closure_stencils) @test Dₓₓ isa LazyTensor{Float64,1,1} + + @test_throws DomainError(3, "Direction must be inside [0, 1].") second_derivative(g_1D, stencil_set, 3) end @testset "2D" begin Dₓₓ = second_derivative(g_2D,stencil_set,1)
