Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/boundaryops/normal_derivative_test.jl @ 2043:0e93fc7fb2e2 bugfix/zero_dim_grid_boundary_ops
Add implementation of normal_derivative for ZeroDimGrid throwing and error
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Thu, 05 Feb 2026 22:23:19 +0100 |
| parents | 471a948cd2b2 |
| children |
comparison
equal
deleted
inserted
replaced
| 2042:5fb64e42138c | 2043:0e93fc7fb2e2 |
|---|---|
| 28 @test d_w == d_l⊗Iy | 28 @test d_w == d_l⊗Iy |
| 29 @test d_n == Ix⊗d_r | 29 @test d_n == Ix⊗d_r |
| 30 @test d_w isa LazyTensor{T,1,2} where T | 30 @test d_w isa LazyTensor{T,1,2} where T |
| 31 @test d_n isa LazyTensor{T,1,2} where T | 31 @test d_n isa LazyTensor{T,1,2} where T |
| 32 end | 32 end |
| 33 | |
| 34 @testset "0D" begin | |
| 35 g = ZeroDimGrid(1) | |
| 36 @test_throws ArgumentError("ZeroDimGrid has no boundaries") normal_derivative(g, stencil_set, ()) | |
| 37 end | |
| 33 end | 38 end |
| 34 @testset "Accuracy" begin | 39 @testset "Accuracy" begin |
| 35 v = eval_on(g_2D, (x,y)-> x^2 + (y-1)^2 + x*y) | 40 v = eval_on(g_2D, (x,y)-> x^2 + (y-1)^2 + x*y) |
| 36 v∂x = eval_on(g_2D, (x,y)-> 2*x + y) | 41 v∂x = eval_on(g_2D, (x,y)-> 2*x + y) |
| 37 v∂y = eval_on(g_2D, (x,y)-> 2*(y-1) + x) | 42 v∂y = eval_on(g_2D, (x,y)-> 2*(y-1) + x) |
