changeset 1107:f80e69b0566b refactor/sbpoperators/inflation

Remove 2D tests from boundary_operator_test
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 09 Jun 2022 07:24:11 +0200
parents 0ba4609605d4
children 6b24dc2d7b11
files test/SbpOperators/boundaryops/boundary_operator_test.jl
diffstat 1 files changed, 0 insertions(+), 59 deletions(-) [+]
line wrap: on
line diff
--- a/test/SbpOperators/boundaryops/boundary_operator_test.jl	Fri May 20 11:31:20 2022 +0200
+++ b/test/SbpOperators/boundaryops/boundary_operator_test.jl	Thu Jun 09 07:24:11 2022 +0200
@@ -7,8 +7,6 @@
 import Sbplib.SbpOperators.Stencil
 import Sbplib.SbpOperators.BoundaryOperator
 
-# REVIEW: Remove the commented tests. It is tested in the user code.
-# TODO: What should happen to all the commented tests? Deleted? Replicated for user code?
 
 @testset "BoundaryOperator" begin
     closure_stencil = Stencil(2.,1.,3.; center = 1)
@@ -25,17 +23,10 @@
             @test op_r == BoundaryOperator(g_1D,closure_stencil,Upper())
             @test op_r isa LazyTensor{T,0,1} where T
         end
-
-        # @testset "2D" begin
-        #     e_w = boundary_operator(g_2D,closure_stencil,CartesianBoundary{1,Upper}())
-        #     @test e_w isa InflatedTensor
-        #     @test e_w isa LazyTensor{T,1,2} where T
-        # end
     end
 
     op_l = BoundaryOperator(g_1D, closure_stencil, Lower())
     op_r = BoundaryOperator(g_1D, closure_stencil, Upper())
-    # op_w, op_e, op_s, op_n = boundary_operator.(Ref(g_2D), Ref(closure_stencil), boundary_identifiers(g_2D))
 
     @testset "Sizes" begin
         @testset "1D" begin
@@ -45,18 +36,6 @@
             @test range_size(op_l) == ()
             @test range_size(op_r) == ()
         end
-
-        # @testset "2D" begin
-        #     @test domain_size(op_w) == (11,15)
-        #     @test domain_size(op_e) == (11,15)
-        #     @test domain_size(op_s) == (11,15)
-        #     @test domain_size(op_n) == (11,15)
-
-        #     @test range_size(op_w) == (15,)
-        #     @test range_size(op_e) == (15,)
-        #     @test range_size(op_s) == (11,)
-        #     @test range_size(op_n) == (11,)
-        # end
     end
 
     @testset "Application" begin
@@ -78,44 +57,6 @@
             @test (op_l'*u)[11] isa ComplexF64
         end
 
-       #  @testset "2D" begin
-       #      v = rand(size(g_2D)...)
-       #      u = fill(3.124)
-       #      @test op_w*v ≈ 2*v[1,:] + v[2,:] + 3*v[3,:] rtol = 1e-14
-       #      @test op_e*v ≈ 2*v[end,:] + v[end-1,:] + 3*v[end-2,:] rtol = 1e-14
-       #      @test op_s*v ≈ 2*v[:,1] + v[:,2] + 3*v[:,3] rtol = 1e-14
-       #      @test op_n*v ≈ 2*v[:,end] + v[:,end-1] + 3*v[:,end-2] rtol = 1e-14
-
-
-       #      g_x = rand(size(g_2D)[1])
-       #      g_y = rand(size(g_2D)[2])
-
-       #      G_w = zeros(Float64, size(g_2D)...)
-       #      G_w[1,:] = 2*g_y
-       #      G_w[2,:] = g_y
-       #      G_w[3,:] = 3*g_y
-
-       #      G_e = zeros(Float64, size(g_2D)...)
-       #      G_e[end,:] = 2*g_y
-       #      G_e[end-1,:] = g_y
-       #      G_e[end-2,:] = 3*g_y
-
-       #      G_s = zeros(Float64, size(g_2D)...)
-       #      G_s[:,1] = 2*g_x
-       #      G_s[:,2] = g_x
-       #      G_s[:,3] = 3*g_x
-
-       #      G_n = zeros(Float64, size(g_2D)...)
-       #      G_n[:,end] = 2*g_x
-       #      G_n[:,end-1] = g_x
-       #      G_n[:,end-2] = 3*g_x
-
-       #      @test op_w'*g_y == G_w
-       #      @test op_e'*g_y == G_e
-       #      @test op_s'*g_x == G_s
-       #      @test op_n'*g_x == G_n
-       # end
-
        @testset "Regions" begin
             u = fill(3.124)
             @test (op_l'*u)[Index(1,Lower)] == 2*u[]