comparison test/SbpOperators/volumeops/derivatives/first_derivative_test.jl @ 1040:7fc8df5157a7 refactor/lazy_tensors

Merge default
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 22 Mar 2022 14:23:55 +0100
parents 1ba8a398af9c 5ec49dd2c7c4
children d12ab8120d29
comparison
equal deleted inserted replaced
1037:9e76bf19904c 1040:7fc8df5157a7
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 LazyTensor{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 LazyTensor{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 LazyTensor{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
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 LazyTensor{Float64,2,2} 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