diff test/SbpOperators/stencil_test.jl @ 1059:4d06642174ec feature/nested_stencils

Add scale method for nested stencils (grafted from 004324d7ed3561aded3ff49905bb26e2c359bd63)
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 10 Feb 2022 11:26:28 +0100
parents c4f71d6f2d63
children 737cd68318c7
line wrap: on
line diff
--- a/test/SbpOperators/stencil_test.jl	Thu Feb 10 10:57:00 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)