diff test/SbpOperators/stencil_test.jl @ 896:004324d7ed35 feature/variable_derivatives

Add scale method for nested stencils
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 10 Feb 2022 11:26:28 +0100
parents 54e36688dab8
children 737cd68318c7
line wrap: on
line diff
--- a/test/SbpOperators/stencil_test.jl	Thu Feb 10 11:08:39 2022 +0100
+++ b/test/SbpOperators/stencil_test.jl	Thu Feb 10 11:26:28 2022 +0100
@@ -64,6 +64,11 @@
         end
     end
 
+    @testset "scale" begin
+        ns = NestedStencil((-1,1,0),(-1,0,1),(0,-1,1), center=2)
+        @test SbpOperators.scale(ns, 2) == NestedStencil((-2,2,0),(-2,0,2),(0,-2,2), center=2)
+    end
+
     @testset "conversion" begin
         ns = NestedStencil((-1,1,0),(-1,0,1),(0,-1,1), center=2)
         @test NestedStencil{Float64}(ns) == NestedStencil((-1.,1.,0.),(-1.,0.,1.),(0.,-1.,1.), center=2)