comparison test/SbpOperators/boundaryops/boundary_operator_test.jl @ 988:83046af6143a

Merge feature/tensormapping_application_promotion
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 16 Mar 2022 18:39:00 +0100
parents 5be8e25c81b3
children df562695b1b5 1ba8a398af9c
comparison
equal deleted inserted replaced
985:1b4f31ae114f 988:83046af6143a
64 @test (op_l*v)[] == 2*v[1] + v[2] + 3*v[3] 64 @test (op_l*v)[] == 2*v[1] + v[2] + 3*v[3]
65 @test (op_r*v)[] == 2*v[end] + v[end-1] + 3*v[end-2] 65 @test (op_r*v)[] == 2*v[end] + v[end-1] + 3*v[end-2]
66 @test (op_r*v)[1] == 2*v[end] + v[end-1] + 3*v[end-2] 66 @test (op_r*v)[1] == 2*v[end] + v[end-1] + 3*v[end-2]
67 @test op_l'*u == [2*u[]; u[]; 3*u[]; zeros(8)] 67 @test op_l'*u == [2*u[]; u[]; 3*u[]; zeros(8)]
68 @test op_r'*u == [zeros(8); 3*u[]; u[]; 2*u[]] 68 @test op_r'*u == [zeros(8); 3*u[]; u[]; 2*u[]]
69
70 v = evalOn(g_1D, x->1. +x*im)
71 @test (op_l*v)[] isa ComplexF64
72
73 u = fill(1. +im)
74 @test (op_l'*u)[1] isa ComplexF64
75 @test (op_l'*u)[5] isa ComplexF64
76 @test (op_l'*u)[11] isa ComplexF64
69 end 77 end
70 78
71 @testset "2D" begin 79 @testset "2D" begin
72 v = rand(size(g_2D)...) 80 v = rand(size(g_2D)...)
73 u = fill(3.124) 81 u = fill(3.124)