diff test/SbpOperators/volumeops/derivatives/first_derivative_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/derivatives/first_derivative_test.jl	Fri Mar 18 13:29:35 2022 +0100
+++ b/test/SbpOperators/volumeops/derivatives/first_derivative_test.jl	Tue Mar 22 09:57:28 2022 +0100
@@ -22,7 +22,7 @@
 
 @testset "first_derivative" begin
     @testset "Constructors" begin
-        stencil_set = StencilSet(sbp_operators_path()*"standard_diagonal.toml"; order=2)
+        stencil_set = read_stencil_set(sbp_operators_path()*"standard_diagonal.toml"; order=2)
 
         g₁ = EquidistantGrid(11, 0., 1.)
         g₂ = EquidistantGrid((11,14), (0.,1.), (1.,3.))
@@ -44,7 +44,7 @@
         N = 20
         g = EquidistantGrid(N, 0//1,2//1)
         @testset for order ∈ [2,4]
-            stencil_set = StencilSet(sbp_operators_path()*"standard_diagonal.toml"; order)
+            stencil_set = read_stencil_set(sbp_operators_path()*"standard_diagonal.toml"; order)
             D₁ = first_derivative(g, stencil_set, 1)
 
             @testset "boundary x^$k" for k ∈ 0:order÷2
@@ -74,7 +74,7 @@
         g = EquidistantGrid(30, 0.,1.)
         v = evalOn(g, x->exp(x))
         @testset for (order, tol) ∈ [(2, 6e-3),(4, 2e-4)]
-            stencil_set = StencilSet(sbp_operators_path()*"standard_diagonal.toml"; order)
+            stencil_set = read_stencil_set(sbp_operators_path()*"standard_diagonal.toml"; order)
             D₁ = first_derivative(g, stencil_set, 1)
 
             @test D₁*v ≈ v rtol=tol