changeset 1373:85bd47f3ba48 feature/variable_derivatives

Switch to stencil set in second_deriviative_variable tests
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 26 May 2023 21:54:23 +0200
parents 3f7f826489a1
children 4f3dd84891f6
files test/SbpOperators/volumeops/derivatives/second_derivative_variable_test.jl
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/test/SbpOperators/volumeops/derivatives/second_derivative_variable_test.jl	Fri May 26 21:45:51 2023 +0200
+++ b/test/SbpOperators/volumeops/derivatives/second_derivative_variable_test.jl	Fri May 26 21:54:23 2023 +0200
@@ -9,10 +9,7 @@
 using LinearAlgebra
 
 @testset "second_derivative_variable" begin
-    interior_stencil = CenteredNestedStencil((1/2, 1/2, 0.),(-1/2, -1., -1/2),( 0., 1/2, 1/2))
-    closure_stencils = [
-        NestedStencil(( 2.,  -1., 0.),(-3., 1.,  0.), (1., 0., 0.), center = 1),
-    ]
+    stencil_set = read_stencil_set(sbp_operators_path()*"standard_diagonal.toml"; order=2)
 
     @testset "1D" begin
         g = equidistant_grid(11, 0., 1.)
@@ -26,7 +23,7 @@
                 c̄ = eval_on(g,c)
                 v̄ = eval_on(g,v)
 
-                D₂ᶜ = second_derivative_variable(g, c̄, interior_stencil, closure_stencils)
+                D₂ᶜ = second_derivative_variable(g, c̄, stencil_set)
                 return D₂ᶜ*v̄
             end
 
@@ -48,7 +45,7 @@
                 c̄ = eval_on(g,c)
                 v̄ = eval_on(g,v)
 
-                D₂ᶜ = second_derivative_variable(g, c̄, interior_stencil, closure_stencils,dir)
+                D₂ᶜ = second_derivative_variable(g, c̄, stencil_set, dir)
                 return D₂ᶜ*v̄
             end