Mercurial > repos > public > sbplib_julia
changeset 395:737e597e0e6d refactor/sbp_operators_tests/collect_and_compare
Rewrite broken tests as testing that the norm is zero
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sun, 04 Oct 2020 19:36:52 +0200 |
parents | 0433ab553d13 |
children | 9aff09ca0052 |
files | test/Manifest.toml test/Project.toml test/testSbpOperators.jl |
diffstat | 3 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/test/Manifest.toml Thu Oct 01 08:23:22 2020 +0200 +++ b/test/Manifest.toml Sun Oct 04 19:36:52 2020 +0200 @@ -16,6 +16,13 @@ deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +[[Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[LinearAlgebra]] +deps = ["Libdl"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + [[Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
--- a/test/Project.toml Thu Oct 01 08:23:22 2020 +0200 +++ b/test/Project.toml Sun Oct 04 19:36:52 2020 +0200 @@ -1,3 +1,4 @@ [deps] +LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" TestSetExtensions = "98d24dd4-01ad-11ea-1b02-c9a08f80db04"
--- a/test/testSbpOperators.jl Thu Oct 01 08:23:22 2020 +0200 +++ b/test/testSbpOperators.jl Sun Oct 04 19:36:52 2020 +0200 @@ -3,6 +3,7 @@ using Sbplib.Grids using Sbplib.RegionIndices using Sbplib.LazyTensors +using LinearAlgebra # TODO: Remove collects for all the tests with TensorApplications @@ -60,8 +61,8 @@ # implies that L*v should be exact for v - monomial up to order 3. # Exact differentiation is measured point-wise. For other grid functions # the error is measured in the l2-norm. - @test_broken Dₓₓ*v0 ≈ 0.0 atol=5e-11 - @test_broken Dₓₓ*v1 ≈ 0.0 atol=5e-11 + @test norm(Dₓₓ*v0) ≈ 0.0 atol=5e-10 + @test norm(Dₓₓ*v1) ≈ 0.0 atol=5e-10 @test Dₓₓ*v2 ≈ v0 atol=5e-11 @test Dₓₓ*v3 ≈ v1 atol=5e-11 @@ -103,8 +104,8 @@ # implies that L*v should be exact for v - monomial up to order 3. # Exact differentiation is measured point-wise. For other grid functions # the error is measured in the H-norm. - @test_broken L*v0 ≈ 0 atol=5e-11 - @test_broken L*v1 ≈ 0 atol=5e-11 + @test norm(L*v0) ≈ 0 atol=5e-10 + @test norm(L*v1) ≈ 0 atol=5e-10 @test L*v2 ≈ v0 # Seems to be more accurate @test L*v3 ≈ v1 atol=5e-10