changeset 706:19301615b340 feature/laplace_opset

Use the Laplace struct in tests for accuracy
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Mon, 15 Feb 2021 17:59:26 +0100
parents bf1387f867b8
children ee1808820929
files test/testSbpOperators.jl
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/test/testSbpOperators.jl	Mon Feb 15 17:53:13 2021 +0100
+++ b/test/testSbpOperators.jl	Mon Feb 15 17:59:26 2021 +0100
@@ -501,7 +501,7 @@
         # 2nd order interior stencil, 1st order boundary stencil,
         # implies that L*v should be exact for binomials up to order 2.
         @testset "2nd order" begin
-            L = laplace(g_3D,op2.innerStencil,op2.closureStencils)
+            L = Laplace(g_3D, sbp_operators_path()*"standard_diagonal.toml"; order=2)
             @test L*polynomials[1] ≈ zeros(Float64, size(g_3D)...) atol = 5e-9
             @test L*polynomials[2] ≈ zeros(Float64, size(g_3D)...) atol = 5e-9
             @test L*polynomials[3] ≈ polynomials[1] atol = 5e-9
@@ -511,8 +511,7 @@
         # 4th order interior stencil, 2nd order boundary stencil,
         # implies that L*v should be exact for binomials up to order 3.
         @testset "4th order" begin
-            op = read_D2_operator(sbp_operators_path()*"standard_diagonal.toml"; order=4)
-            L = laplace(g_3D,op4.innerStencil,op4.closureStencils)
+            L = Laplace(g_3D, sbp_operators_path()*"standard_diagonal.toml"; order=4)
             # NOTE: high tolerances for checking the "exact" differentiation
             # due to accumulation of round-off errors/cancellation errors?
             @test L*polynomials[1] ≈ zeros(Float64, size(g_3D)...) atol = 5e-9