Mercurial > repos > public > sbplib_julia
comparison test/testSbpOperators.jl @ 612:1db945cba3a2 feature/volume_and_boundary_operators
Remove extra argument to volume_operator in SecondDerivative()
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sat, 05 Dec 2020 20:46:49 +0100 |
parents | e40e7439d1b4 |
children | f59e1732eacc |
comparison
equal
deleted
inserted
replaced
611:e71f2f81b5f8 | 612:1db945cba3a2 |
---|---|
105 | 105 |
106 # 4th order interior stencil, 2nd order boundary stencil, | 106 # 4th order interior stencil, 2nd order boundary stencil, |
107 # implies that L*v should be exact for v - monomial up to order 3. | 107 # implies that L*v should be exact for v - monomial up to order 3. |
108 # Exact differentiation is measured point-wise. For other grid functions | 108 # Exact differentiation is measured point-wise. For other grid functions |
109 # the error is measured in the H-norm. | 109 # the error is measured in the H-norm. |
110 @test norm(L*v0) ≈ 0 atol=5e-10 | 110 @test norm(L*v0) ≈ 0 atol=1e-9 |
111 @test norm(L*v1) ≈ 0 atol=5e-10 | 111 @test norm(L*v1) ≈ 0 atol=1e-9 |
112 @test L*v2 ≈ v0 # Seems to be more accurate | 112 @test L*v2 ≈ v0 # Seems to be more accurate |
113 @test L*v3 ≈ v1 atol=5e-10 | 113 @test L*v3 ≈ v1 atol=1e-9 |
114 | 114 |
115 h = spacing(g) | 115 h = spacing(g) |
116 l2(v) = sqrt(prod(h)*sum(v.^2)) | 116 l2(v) = sqrt(prod(h)*sum(v.^2)) |
117 @test L*v4 ≈ v2 atol=5e-4 norm=l2 | 117 @test L*v4 ≈ v2 atol=5e-4 norm=l2 |
118 @test L*v5 ≈ v5ₓₓ atol=5e-4 norm=l2 | 118 @test L*v5 ≈ v5ₓₓ atol=5e-4 norm=l2 |