comparison test/SbpOperators/boundaryops/boundary_operator_test.jl @ 946:469ed954b493 feature/tensormapping_application_promotion

Allow volume_operator, boundary_operator, and constant_interior_scaling_operator to act on arbitrary arrays
author Jonatan Werpers <jonatan@werpers.com>
date Sat, 12 Mar 2022 22:26:23 +0100
parents 45966c77cb20
children e79debd10f7d 5be8e25c81b3
comparison
equal deleted inserted replaced
945:1f41cf9454f2 946:469ed954b493
70 @test (op_l*v)[] == 2*v[1] + v[2] + 3*v[3] 70 @test (op_l*v)[] == 2*v[1] + v[2] + 3*v[3]
71 @test (op_r*v)[] == 2*v[end] + v[end-1] + 3*v[end-2] 71 @test (op_r*v)[] == 2*v[end] + v[end-1] + 3*v[end-2]
72 @test (op_r*v)[1] == 2*v[end] + v[end-1] + 3*v[end-2] 72 @test (op_r*v)[1] == 2*v[end] + v[end-1] + 3*v[end-2]
73 @test op_l'*u == [2*u[]; u[]; 3*u[]; zeros(8)] 73 @test op_l'*u == [2*u[]; u[]; 3*u[]; zeros(8)]
74 @test op_r'*u == [zeros(8); 3*u[]; u[]; 2*u[]] 74 @test op_r'*u == [zeros(8); 3*u[]; u[]; 2*u[]]
75
76 v = evalOn(g_1D, x->1. +x*im)
77 @test (op_l*v)[] isa ComplexF64
78
79 u = fill(1. +im)
80 @test (op_l'*u)[1] isa ComplexF64
81 @test (op_l'*u)[5] isa ComplexF64
82 @test (op_l'*u)[11] isa ComplexF64
75 end 83 end
76 84
77 @testset "2D" begin 85 @testset "2D" begin
78 v = rand(size(g_2D)...) 86 v = rand(size(g_2D)...)
79 u = fill(3.124) 87 u = fill(3.124)