diff test/SbpOperators/volumeops/derivatives/first_derivative_test.jl @ 989:7bf3121c6864 feature/stencil_set_type

Add type StencilSet
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Thu, 17 Mar 2022 21:31:20 +0100
parents 5bfc03cf3ba7
children b6238afd3bb0
line wrap: on
line diff
--- a/test/SbpOperators/volumeops/derivatives/first_derivative_test.jl	Wed Mar 16 18:39:00 2022 +0100
+++ b/test/SbpOperators/volumeops/derivatives/first_derivative_test.jl	Thu Mar 17 21:31:20 2022 +0100
@@ -22,7 +22,7 @@
 
 @testset "first_derivative" begin
     @testset "Constructors" begin
-        stencil_set = read_stencil_set(sbp_operators_path()*"standard_diagonal.toml"; order=2)
+        stencil_set = StencilSet(sbp_operators_path()*"standard_diagonal.toml"; order=2)
 
         g₁ = EquidistantGrid(11, 0., 1.)
         g₂ = EquidistantGrid((11,14), (0.,1.), (1.,3.))
@@ -42,7 +42,7 @@
         N = 20
         g = EquidistantGrid(N, 0//1,2//1)
         @testset for order ∈ [2,4]
-            stencil_set = read_stencil_set(sbp_operators_path()*"standard_diagonal.toml"; order)
+            stencil_set = StencilSet(sbp_operators_path()*"standard_diagonal.toml"; order)
             D₁ = first_derivative(g, stencil_set, 1)
 
             @testset "boundary x^$k" for k ∈ 0:order÷2
@@ -72,7 +72,7 @@
         g = EquidistantGrid(30, 0.,1.)
         v = evalOn(g, x->exp(x))
         @testset for (order, tol) ∈ [(2, 6e-3),(4, 2e-4)]
-            stencil_set = read_stencil_set(sbp_operators_path()*"standard_diagonal.toml"; order)
+            stencil_set = StencilSet(sbp_operators_path()*"standard_diagonal.toml"; order)
             D₁ = first_derivative(g, stencil_set, 1)
 
             @test D₁*v ≈ v rtol=tol