comparison test/SbpOperators/volumeops/derivatives/first_derivative_test.jl @ 995:1ba8a398af9c refactor/lazy_tensors

Rename types
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 18 Mar 2022 21:14:47 +0100
parents 5bfc03cf3ba7
children 7fc8df5157a7 05a25a5063bb
comparison
equal deleted inserted replaced
994:55ab7801c45f 995:1ba8a398af9c
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 32
33 interior_stencil = CenteredStencil(-1,0,1) 33 interior_stencil = CenteredStencil(-1,0,1)
34 closure_stencils = [Stencil(-1,1, center=1)] 34 closure_stencils = [Stencil(-1,1, center=1)]
35 35
36 @test first_derivative(g₁, interior_stencil, closure_stencils, 1) isa TensorMapping{Float64,1,1} 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 VolumeOperator 37 @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} 38 @test first_derivative(g₂, interior_stencil, closure_stencils, 2) isa LazyTensor{Float64,2,2}
39 end 39 end
40 40
41 @testset "Accuracy conditions" begin 41 @testset "Accuracy conditions" begin
42 N = 20 42 N = 20
43 g = EquidistantGrid(N, 0//1,2//1) 43 g = EquidistantGrid(N, 0//1,2//1)