Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/volumeops/derivatives/first_derivative_test.jl @ 990:b6238afd3bb0 feature/stencil_set_type
Add methods for creating derivative operators in 1D from stencil sets without providing directions
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Fri, 18 Mar 2022 13:02:46 +0100 |
parents | 7bf3121c6864 |
children | 5ec49dd2c7c4 |
comparison
equal
deleted
inserted
replaced
989:7bf3121c6864 | 990:b6238afd3bb0 |
---|---|
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 TensorMapping{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 TensorMapping{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 TensorMapping{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 |
39 @test first_derivative(g₁, interior_stencil, closure_stencils, 1) == first_derivative(g₁, interior_stencil, closure_stencils) | |
38 @test first_derivative(g₂, interior_stencil, closure_stencils, 2) isa TensorMapping{Float64,2,2} | 40 @test first_derivative(g₂, interior_stencil, closure_stencils, 2) isa TensorMapping{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 |