diff test/SbpOperators/volumeops/laplace/laplace_test.jl @ 1018:5ec49dd2c7c4 feature/stencil_set_type

Reintroduce read_stencil_set
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Tue, 22 Mar 2022 09:57:28 +0100
parents b6238afd3bb0
children 7fc8df5157a7
line wrap: on
line diff
--- a/test/SbpOperators/volumeops/laplace/laplace_test.jl	Fri Mar 18 13:29:35 2022 +0100
+++ b/test/SbpOperators/volumeops/laplace/laplace_test.jl	Tue Mar 22 09:57:28 2022 +0100
@@ -6,7 +6,7 @@
 
 # Default stencils (4th order)
 operator_path = sbp_operators_path()*"standard_diagonal.toml"
-stencil_set = StencilSet(operator_path; order=4)
+stencil_set = read_stencil_set(operator_path; order=4)
 inner_stencil = parse_stencil(stencil_set["D2"]["inner_stencil"])
 closure_stencils = parse_stencil.(stencil_set["D2"]["closure_stencils"])
 g_1D = EquidistantGrid(101, 0.0, 1.)
@@ -42,7 +42,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
-            stencil_set = StencilSet(operator_path; order=2)
+            stencil_set = read_stencil_set(operator_path; order=2)
             Δ = Laplace(g_3D, stencil_set)
             @test Δ*polynomials[1] ≈ zeros(Float64, size(g_3D)...) atol = 5e-9
             @test Δ*polynomials[2] ≈ zeros(Float64, size(g_3D)...) atol = 5e-9
@@ -53,7 +53,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
-            stencil_set = StencilSet(operator_path; order=4)
+            stencil_set = read_stencil_set(operator_path; order=4)
             Δ = Laplace(g_3D, stencil_set)
             # NOTE: high tolerances for checking the "exact" differentiation
             # due to accumulation of round-off errors/cancellation errors?