Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/volumeops/derivatives/first_derivative_test.jl @ 1047:d12ab8120d29 feature/first_derivative
Merge default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 23 Mar 2022 12:43:03 +0100 |
parents | e00eb000346e 7fc8df5157a7 |
children | 157a78959e5d |
comparison
equal
deleted
inserted
replaced
1046:e00eb000346e | 1047:d12ab8120d29 |
---|---|
25 stencil_set = read_stencil_set(sbp_operators_path()*"standard_diagonal.toml"; order=2) | 25 stencil_set = read_stencil_set(sbp_operators_path()*"standard_diagonal.toml"; order=2) |
26 | 26 |
27 g₁ = EquidistantGrid(11, 0., 1.) | 27 g₁ = EquidistantGrid(11, 0., 1.) |
28 g₂ = EquidistantGrid((11,14), (0.,1.), (1.,3.)) | 28 g₂ = EquidistantGrid((11,14), (0.,1.), (1.,3.)) |
29 | 29 |
30 @test first_derivative(g₁, stencil_set, 1) isa TensorMapping{Float64,1,1} | 30 @test first_derivative(g₁, stencil_set, 1) isa LazyTensor{Float64,1,1} |
31 @test first_derivative(g₂, stencil_set, 2) isa TensorMapping{Float64,2,2} | 31 @test first_derivative(g₂, stencil_set, 2) isa LazyTensor{Float64,2,2} |
32 @test first_derivative(g₁, stencil_set, 1) == first_derivative(g₁, stencil_set) | |
32 | 33 |
33 interior_stencil = CenteredStencil(-1,0,1) | 34 interior_stencil = CenteredStencil(-1,0,1) |
34 closure_stencils = [Stencil(-1,1, center=1)] | 35 closure_stencils = [Stencil(-1,1, center=1)] |
35 | 36 |
36 @test first_derivative(g₁, interior_stencil, closure_stencils, 1) isa TensorMapping{Float64,1,1} | 37 @test first_derivative(g₁, interior_stencil, closure_stencils, 1) isa LazyTensor{Float64,1,1} |
37 @test first_derivative(g₁, interior_stencil, closure_stencils, 1) isa VolumeOperator | 38 @test first_derivative(g₁, interior_stencil, closure_stencils, 1) isa VolumeOperator |
38 @test first_derivative(g₂, interior_stencil, closure_stencils, 2) isa TensorMapping{Float64,2,2} | 39 @test first_derivative(g₁, interior_stencil, closure_stencils, 1) == first_derivative(g₁, interior_stencil, closure_stencils) |
40 @test first_derivative(g₂, interior_stencil, closure_stencils, 2) isa LazyTensor{Float64,2,2} | |
39 end | 41 end |
40 | 42 |
41 @testset "Accuracy conditions" begin | 43 @testset "Accuracy conditions" begin |
42 N = 20 | 44 N = 20 |
43 g = EquidistantGrid(N, 0//1,2//1) | 45 g = EquidistantGrid(N, 0//1,2//1) |