comparison test/testSbpOperators.jl @ 397:3cecbfb3d623 refactor/sbp_operators_tests/collect_and_compare

Remove some finished todos
author Jonatan Werpers <jonatan@werpers.com>
date Sun, 04 Oct 2020 19:41:14 +0200
parents 9aff09ca0052
children 21fba50cb5b0 547639572208 4aa7fe13a984
comparison
equal deleted inserted replaced
396:9aff09ca0052 397:3cecbfb3d623
2 using Sbplib.SbpOperators 2 using Sbplib.SbpOperators
3 using Sbplib.Grids 3 using Sbplib.Grids
4 using Sbplib.RegionIndices 4 using Sbplib.RegionIndices
5 using Sbplib.LazyTensors 5 using Sbplib.LazyTensors
6 using LinearAlgebra 6 using LinearAlgebra
7
8 # TODO: Remove collects for all the tests with TensorApplications
9 7
10 @testset "SbpOperators" begin 8 @testset "SbpOperators" begin
11 9
12 # @testset "apply_quadrature" begin 10 # @testset "apply_quadrature" begin
13 # op = readOperator(sbp_operators_path()*"d2_4th.txt",sbp_operators_path()*"h_4th.txt") 11 # op = readOperator(sbp_operators_path()*"d2_4th.txt",sbp_operators_path()*"h_4th.txt")
52 v5 = evalOn(g,f5) 50 v5 = evalOn(g,f5)
53 51
54 @test Dₓₓ isa TensorMapping{T,1,1} where T 52 @test Dₓₓ isa TensorMapping{T,1,1} where T
55 @test Dₓₓ' isa TensorMapping{T,1,1} where T 53 @test Dₓₓ' isa TensorMapping{T,1,1} where T
56 54
57 # TODO: Should perhaps set tolerance level for isapporx instead?
58 # Are these tolerance levels resonable or should tests be constructed
59 # differently?
60 # 4th order interior stencil, 2nd order boundary stencil, 55 # 4th order interior stencil, 2nd order boundary stencil,
61 # implies that L*v should be exact for v - monomial up to order 3. 56 # implies that L*v should be exact for v - monomial up to order 3.
62 # Exact differentiation is measured point-wise. For other grid functions 57 # Exact differentiation is measured point-wise. For other grid functions
63 # the error is measured in the l2-norm. 58 # the error is measured in the l2-norm.
64 @test norm(Dₓₓ*v0) ≈ 0.0 atol=5e-10 59 @test norm(Dₓₓ*v0) ≈ 0.0 atol=5e-10