comparison DiffOps/test/runtests.jl @ 235:a5fdc00d5070 boundary_conditions

Fix a bunch of compilation errors
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 26 Jun 2019 17:54:32 +0200
parents 30112f73555c
children 60011a10e17d
comparison
equal deleted inserted replaced
234:d119dfdd749c 235:a5fdc00d5070
1 using Test
1 using DiffOps 2 using DiffOps
2 using Test 3 using Grids
4 using SbpOperators
5 using RegionIndices
6 using LazyTensors
3 7
4 @test_broken false 8 @test_broken false
9
10 @testset "BoundaryValue" begin
11 op = readOperator(sbp_operators_path()*"d2_4th.txt",sbp_operators_path()*"h_4th.txt")
12 g = EquidistantGrid((3,3), (0.0, 0.0), (1.0,1.0))
13
14 e_w = BoundaryValue(op, g, CartesianBoundary{1,Lower}())
15 e_e = BoundaryValue(op, g, CartesianBoundary{1,Upper}())
16 e_s = BoundaryValue(op, g, CartesianBoundary{2,Lower}())
17 e_n = BoundaryValue(op, g, CartesianBoundary{2,Upper}())
18
19 v = [
20 1 2 3;
21 4 5 6;
22 7 8 9.0;
23 10 11 12;
24 ]
25
26 @test e_w isa TensorMapping{T,2,1} where T
27 @test e_w' isa TensorMapping{T,1,2} where T
28
29 @test domain_size(e_w, (3,2)) == (2,)
30 @test domain_size(e_e, (3,2)) == (2,)
31 @test domain_size(e_s, (3,2)) == (3,)
32 @test domain_size(e_n, (3,2)) == (3,)
33
34
35 @test collect(e_w'*v) == [1,4,7.0]
36
37 end