Mercurial > repos > public > sbplib_julia
annotate test/SbpOperators/allocations_test.jl @ 1886:9ce6d939dfae allocation_testing
Start experimenting with allocation testing
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 07 Apr 2022 07:37:02 +0200 |
parents | |
children | 24590890e124 |
rev | line source |
---|---|
1886
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
1 using Test |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
2 using BenchmarkTools |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
3 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
4 using Sbplib.Grids |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
5 using Sbplib.SbpOperators |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
6 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
7 using Sbplib.LazyTensors |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
8 using Sbplib.RegionIndices |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
9 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
10 @testset "Allocations" begin |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
11 stencil_set = read_stencil_set(sbp_operators_path()*"standard_diagonal.toml", order=4) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
12 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
13 @testset "1D" begin |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
14 g₁ = EquidistantGrid(15, 0.,1.) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
15 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
16 H = inner_product(g₁, stencil_set) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
17 H⁻¹ = inverse_inner_product(g₁, stencil_set) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
18 D₂ = second_derivative(g₁, stencil_set, 1) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
19 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
20 eₗ = boundary_restriction(g₁, stencil_set, CartesianBoundary{1,Lower}()) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
21 eᵣ = boundary_restriction(g₁, stencil_set, CartesianBoundary{1,Upper}()) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
22 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
23 dₗ = normal_derivative(g₁, stencil_set, CartesianBoundary{1,Lower}()) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
24 dᵣ = normal_derivative(g₁, stencil_set, CartesianBoundary{1,Upper}()) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
25 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
26 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
27 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
28 @testset "Derivative operator" begin |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
29 v = rand(size(g₁)...) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
30 @test (@ballocated LazyTensors.apply($D₂, $v, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
31 @test (@ballocated LazyTensors.apply($D₂, $v, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
32 @test (@ballocated LazyTensors.apply($D₂, $v, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
33 end |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
34 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
35 @testset "inner_product operator" begin |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
36 v = rand(size(g₁)...) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
37 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
38 @test (@ballocated LazyTensors.apply($H, $v, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
39 @test (@ballocated LazyTensors.apply($H, $v, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
40 @test (@ballocated LazyTensors.apply($H, $v, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
41 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
42 @test (@ballocated LazyTensors.apply($(H∘H), $v, 5)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
43 end |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
44 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
45 @testset "inverse_inner_product operator" begin |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
46 v = rand(size(g₁)...) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
47 @test (@ballocated LazyTensors.apply($H⁻¹, $v, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
48 @test (@ballocated LazyTensors.apply($H⁻¹, $v, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
49 @test (@ballocated LazyTensors.apply($H⁻¹, $v, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
50 end |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
51 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
52 @testset "boundary operators" begin |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
53 v = rand(size(g₁)...) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
54 @test (@ballocated LazyTensors.apply($eₗ, $v)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
55 @test (@ballocated LazyTensors.apply($eᵣ, $v)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
56 @test (@ballocated LazyTensors.apply($dₗ, $v)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
57 @test (@ballocated LazyTensors.apply($dᵣ, $v)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
58 end |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
59 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
60 @testset "boundary operator transposes" begin |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
61 v = fill(1.) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
62 @test (@ballocated LazyTensors.apply($eₗ', $v, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
63 @test (@ballocated LazyTensors.apply($eₗ', $v, 7)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
64 @test (@ballocated LazyTensors.apply($eₗ', $v, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
65 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
66 @test (@ballocated LazyTensors.apply($eᵣ', $v, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
67 @test (@ballocated LazyTensors.apply($eᵣ', $v, 7)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
68 @test (@ballocated LazyTensors.apply($eᵣ', $v, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
69 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
70 @test (@ballocated LazyTensors.apply($dₗ', $v, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
71 @test (@ballocated LazyTensors.apply($dₗ', $v, 7)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
72 @test (@ballocated LazyTensors.apply($dₗ', $v, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
73 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
74 @test (@ballocated LazyTensors.apply($dᵣ', $v, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
75 @test (@ballocated LazyTensors.apply($dᵣ', $v, 7)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
76 @test (@ballocated LazyTensors.apply($dᵣ', $v, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
77 end |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
78 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
79 @testset "sat terms" begin |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
80 v = rand(size(g₁)...) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
81 neumannSATₗ = H⁻¹∘eₗ'∘dₗ |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
82 neumannSATᵣ = H⁻¹∘eᵣ'∘dᵣ |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
83 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
84 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
85 @test (@ballocated LazyTensors.apply($neumannSATₗ, $v, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
86 @test (@ballocated LazyTensors.apply($neumannSATₗ, $v, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
87 @test (@ballocated LazyTensors.apply($neumannSATₗ, $v, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
88 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
89 @test (@ballocated LazyTensors.apply($neumannSATᵣ, $v, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
90 @test (@ballocated LazyTensors.apply($neumannSATᵣ, $v, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
91 @test (@ballocated LazyTensors.apply($neumannSATᵣ, $v, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
92 end |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
93 end |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
94 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
95 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
96 @testset "2D" begin |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
97 g₂ = EquidistantGrid((15,15), (0.,0.),(1.,1.)) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
98 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
99 H = inner_product(g₂, stencil_set) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
100 H⁻¹ = inverse_inner_product(g₂, stencil_set) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
101 D₂x = second_derivative(g₂, stencil_set, 1) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
102 D₂y = second_derivative(g₂, stencil_set, 2) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
103 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
104 e₁ₗ = boundary_restriction(g₂, stencil_set, CartesianBoundary{1,Lower}()) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
105 e₁ᵤ = boundary_restriction(g₂, stencil_set, CartesianBoundary{1,Upper}()) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
106 e₂ₗ = boundary_restriction(g₂, stencil_set, CartesianBoundary{2,Lower}()) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
107 e₂ᵤ = boundary_restriction(g₂, stencil_set, CartesianBoundary{2,Upper}()) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
108 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
109 d₁ₗ = normal_derivative(g₂, stencil_set, CartesianBoundary{1,Lower}()) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
110 d₁ᵤ = normal_derivative(g₂, stencil_set, CartesianBoundary{1,Upper}()) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
111 d₂ₗ = normal_derivative(g₂, stencil_set, CartesianBoundary{2,Lower}()) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
112 d₂ᵤ = normal_derivative(g₂, stencil_set, CartesianBoundary{2,Upper}()) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
113 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
114 H₁ₗ = inner_product(boundary_grid(g₂, CartesianBoundary{1,Lower}()), stencil_set) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
115 H₁ᵤ = inner_product(boundary_grid(g₂, CartesianBoundary{1,Upper}()), stencil_set) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
116 H₂ₗ = inner_product(boundary_grid(g₂, CartesianBoundary{2,Lower}()), stencil_set) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
117 H₂ᵤ = inner_product(boundary_grid(g₂, CartesianBoundary{2,Upper}()), stencil_set) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
118 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
119 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
120 @testset "Derivative operator" begin |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
121 v = rand(size(g₂)...) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
122 @test (@ballocated LazyTensors.apply($D₂x, $v, 1, 7)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
123 @test (@ballocated LazyTensors.apply($D₂x, $v, 6, 7)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
124 @test (@ballocated LazyTensors.apply($D₂x, $v, 15, 7)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
125 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
126 @test (@ballocated LazyTensors.apply($D₂y, $v, 7, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
127 @test (@ballocated LazyTensors.apply($D₂y, $v, 7, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
128 @test (@ballocated LazyTensors.apply($D₂y, $v, 7, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
129 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
130 @test (@ballocated LazyTensors.apply($(D₂x∘D₂y), $v, 1, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
131 @test (@ballocated LazyTensors.apply($(D₂x∘D₂y), $v, 7, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
132 @test (@ballocated LazyTensors.apply($(D₂x∘D₂y), $v, 15, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
133 end |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
134 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
135 @testset "inner_product operator" begin |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
136 v = rand(size(g₂)...) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
137 @test (@ballocated LazyTensors.apply($H, $v, 1, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
138 @test (@ballocated LazyTensors.apply($H, $v, 1, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
139 @test (@ballocated LazyTensors.apply($H, $v, 1, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
140 @test (@ballocated LazyTensors.apply($H, $v, 6, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
141 @test (@ballocated LazyTensors.apply($H, $v, 6, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
142 @test (@ballocated LazyTensors.apply($H, $v, 6, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
143 @test (@ballocated LazyTensors.apply($H, $v, 15, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
144 @test (@ballocated LazyTensors.apply($H, $v, 15, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
145 @test (@ballocated LazyTensors.apply($H, $v, 15, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
146 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
147 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
148 @test (@ballocated LazyTensors.apply($(H∘H), $v, 5, 5)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
149 end |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
150 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
151 @testset "inverse_inner_product operator" begin |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
152 v = rand(size(g₂)...) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
153 @test (@ballocated LazyTensors.apply($H⁻¹, $v, 1, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
154 @test (@ballocated LazyTensors.apply($H⁻¹, $v, 1, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
155 @test (@ballocated LazyTensors.apply($H⁻¹, $v, 1, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
156 @test (@ballocated LazyTensors.apply($H⁻¹, $v, 6, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
157 @test (@ballocated LazyTensors.apply($H⁻¹, $v, 6, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
158 @test (@ballocated LazyTensors.apply($H⁻¹, $v, 6, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
159 @test (@ballocated LazyTensors.apply($H⁻¹, $v, 15, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
160 @test (@ballocated LazyTensors.apply($H⁻¹, $v, 15, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
161 @test (@ballocated LazyTensors.apply($H⁻¹, $v, 15, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
162 end |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
163 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
164 @testset "boundary operators" begin |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
165 v = rand(size(g₂)...) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
166 @test (@ballocated LazyTensors.apply($e₁ₗ, $v, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
167 @test (@ballocated LazyTensors.apply($e₁ᵤ, $v, 5)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
168 @test (@ballocated LazyTensors.apply($e₂ₗ, $v, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
169 @test (@ballocated LazyTensors.apply($e₂ᵤ, $v, 3)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
170 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
171 @test (@ballocated LazyTensors.apply($d₁ₗ, $v, 5)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
172 @test (@ballocated LazyTensors.apply($d₁ᵤ, $v, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
173 @test (@ballocated LazyTensors.apply($d₂ₗ, $v, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
174 @test (@ballocated LazyTensors.apply($d₂ᵤ, $v, 5)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
175 end |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
176 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
177 @testset "boundary operator transposes" begin |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
178 v = rand(first(size(g₂))) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
179 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
180 @test (@ballocated LazyTensors.apply($e₁ₗ', $v, 1, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
181 @test (@ballocated LazyTensors.apply($e₁ₗ', $v, 1, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
182 @test (@ballocated LazyTensors.apply($e₁ₗ', $v, 1, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
183 @test (@ballocated LazyTensors.apply($e₁ₗ', $v, 6, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
184 @test (@ballocated LazyTensors.apply($e₁ₗ', $v, 6, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
185 @test (@ballocated LazyTensors.apply($e₁ₗ', $v, 6, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
186 @test (@ballocated LazyTensors.apply($e₁ₗ', $v, 15, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
187 @test (@ballocated LazyTensors.apply($e₁ₗ', $v, 15, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
188 @test (@ballocated LazyTensors.apply($e₁ₗ', $v, 15, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
189 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
190 @test (@ballocated LazyTensors.apply($d₂ᵤ', $v, 1, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
191 @test (@ballocated LazyTensors.apply($d₂ᵤ', $v, 1, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
192 @test (@ballocated LazyTensors.apply($d₂ᵤ', $v, 1, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
193 @test (@ballocated LazyTensors.apply($d₂ᵤ', $v, 6, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
194 @test (@ballocated LazyTensors.apply($d₂ᵤ', $v, 6, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
195 @test (@ballocated LazyTensors.apply($d₂ᵤ', $v, 6, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
196 @test (@ballocated LazyTensors.apply($d₂ᵤ', $v, 15, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
197 @test (@ballocated LazyTensors.apply($d₂ᵤ', $v, 15, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
198 @test (@ballocated LazyTensors.apply($d₂ᵤ', $v, 15, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
199 end |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
200 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
201 @testset "sat terms" begin |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
202 v = rand(size(g₂)...) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
203 u = rand(size(g₂)[1]) |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
204 # neumannSAT₁ₗ = H⁻¹∘e₁ₗ'∘H₁ₗ∘d₁ₗ |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
205 # neumannSAT₂ᵤ = H⁻¹∘e₂ᵤ'∘H₂ᵤ∘d₂ᵤ |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
206 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
207 neumannSAT₁ₗ = e₁ₗ'∘d₁ₗ |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
208 neumannSAT₂ᵤ = e₂ᵤ'∘d₂ᵤ |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
209 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
210 # indices = [1,6,15] |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
211 indices = [1] |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
212 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
213 @testset for i ∈ indices |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
214 @testset for j ∈ indices |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
215 @test (@ballocated LazyTensors.apply($(e₁ₗ'∘d₁ₗ), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
216 @test (@ballocated LazyTensors.apply($(d₁ₗ'∘e₁ₗ), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
217 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
218 @test_broken (@ballocated LazyTensors.apply($(H⁻¹∘e₁ₗ'∘H₁ₗ∘d₁ₗ), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
219 @test_broken (@ballocated LazyTensors.apply($(e₁ₗ'∘H₁ₗ∘d₁ₗ∘H⁻¹), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
220 @test (@ballocated LazyTensors.apply($(e₁ₗ'∘H₁ₗ∘d₁ₗ), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
221 @test_broken (@ballocated LazyTensors.apply($(H⁻¹∘e₁ₗ'∘d₁ₗ), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
222 @test (@ballocated LazyTensors.apply($(H⁻¹∘D₂x), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
223 @test (@ballocated LazyTensors.apply($(H⁻¹∘D₂y), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
224 @test_broken (@ballocated LazyTensors.apply($(H⁻¹∘D₂x∘D₂y), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
225 @test_broken (@ballocated LazyTensors.apply($(D₂x∘e₁ₗ'∘H₁ₗ∘d₁ₗ), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
226 @test_broken (@ballocated LazyTensors.apply($(D₂y∘e₁ₗ'∘H₁ₗ∘d₁ₗ), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
227 @test (@ballocated LazyTensors.apply($(D₂x∘e₁ₗ'∘d₁ₗ), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
228 @test (@ballocated LazyTensors.apply($(D₂y∘e₁ₗ'∘d₁ₗ), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
229 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
230 @test (@ballocated LazyTensors.apply($(H⁻¹∘e₁ₗ'), $u, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
231 @test (@ballocated LazyTensors.apply($(e₁ₗ'∘H₁ₗ), $u, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
232 @test (@ballocated LazyTensors.apply($(H₁ₗ∘d₁ₗ), $v, $i)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
233 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
234 @test_broken (@ballocated LazyTensors.apply($(H⁻¹∘e₁ₗ'∘H₁ₗ), $u, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
235 @test (@ballocated LazyTensors.apply($(H₁ₗ∘e₁ₗ∘H⁻¹), $v, $i)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
236 @test (@ballocated LazyTensors.apply($(H₁ₗ∘d₁ₗ∘H⁻¹), $v, $i)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
237 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
238 @test_broken (@ballocated LazyTensors.apply($(e₁ₗ'∘e₁ₗ∘e₁ₗ'∘e₁ₗ), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
239 @test (@ballocated LazyTensors.apply($(e₁ₗ'∘e₁ₗ∘e₁ₗ'), $u, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
240 @test (@ballocated LazyTensors.apply($(e₁ₗ∘e₁ₗ'∘e₁ₗ), $v, $i)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
241 @test (@ballocated LazyTensors.apply($(e₁ₗ'∘e₁ₗ), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
242 @test (@ballocated LazyTensors.apply($(e₁ₗ∘e₁ₗ'), $u, $i)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
243 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
244 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
245 @test (@ballocated LazyTensors.apply($H, $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
246 @test (@ballocated LazyTensors.apply($(H∘H), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
247 @test_broken (@ballocated LazyTensors.apply($(H∘H∘H), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
248 @test_broken (@ballocated LazyTensors.apply($(H∘H∘H∘H), $v, $i, $j)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
249 end |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
250 @test (@ballocated LazyTensors.apply($(e₁ₗ∘d₁ₗ'), $u, $i)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
251 @test (@ballocated LazyTensors.apply($(d₁ₗ∘e₁ₗ'), $u, $i)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
252 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
253 @test (@ballocated LazyTensors.apply($(e₁ₗ∘H∘d₁ₗ'), $u, $i)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
254 @test (@ballocated LazyTensors.apply($(d₁ₗ∘H∘e₁ₗ'), $u, $i)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
255 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
256 @test (@ballocated LazyTensors.apply($(H₁ₗ∘e₁ₗ∘d₁ₗ'), $u, $i)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
257 @test (@ballocated LazyTensors.apply($(H₁ₗ∘d₁ₗ∘e₁ₗ'), $u, $i)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
258 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
259 @test_broken (@ballocated LazyTensors.apply($(H₁ₗ∘e₁ₗ∘H∘d₁ₗ'), $u, $i)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
260 @test_broken (@ballocated LazyTensors.apply($(H₁ₗ∘d₁ₗ∘H∘e₁ₗ'), $u, $i)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
261 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
262 @test_broken (@ballocated LazyTensors.apply($(e₁ₗ∘H∘d₁ₗ'∘H₁ₗ), $u, $i)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
263 @test_broken (@ballocated LazyTensors.apply($(d₁ₗ∘H∘e₁ₗ'∘H₁ₗ), $u, $i)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
264 end |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
265 @test (@ballocated LazyTensors.apply($neumannSAT₁ₗ, $v, 1, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
266 @test (@ballocated LazyTensors.apply($neumannSAT₁ₗ, $v, 1, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
267 @test (@ballocated LazyTensors.apply($neumannSAT₁ₗ, $v, 1, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
268 @test (@ballocated LazyTensors.apply($neumannSAT₁ₗ, $v, 6, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
269 @test (@ballocated LazyTensors.apply($neumannSAT₁ₗ, $v, 6, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
270 @test (@ballocated LazyTensors.apply($neumannSAT₁ₗ, $v, 6, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
271 @test (@ballocated LazyTensors.apply($neumannSAT₁ₗ, $v, 15, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
272 @test (@ballocated LazyTensors.apply($neumannSAT₁ₗ, $v, 15, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
273 @test (@ballocated LazyTensors.apply($neumannSAT₁ₗ, $v, 15, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
274 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
275 @test (@ballocated LazyTensors.apply($neumannSAT₂ᵤ, $v, 1, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
276 @test (@ballocated LazyTensors.apply($neumannSAT₂ᵤ, $v, 1, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
277 @test (@ballocated LazyTensors.apply($neumannSAT₂ᵤ, $v, 1, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
278 @test (@ballocated LazyTensors.apply($neumannSAT₂ᵤ, $v, 6, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
279 @test (@ballocated LazyTensors.apply($neumannSAT₂ᵤ, $v, 6, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
280 @test (@ballocated LazyTensors.apply($neumannSAT₂ᵤ, $v, 6, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
281 @test (@ballocated LazyTensors.apply($neumannSAT₂ᵤ, $v, 15, 1)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
282 @test (@ballocated LazyTensors.apply($neumannSAT₂ᵤ, $v, 15, 6)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
283 @test (@ballocated LazyTensors.apply($neumannSAT₂ᵤ, $v, 15, 15)) == 0 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
284 end |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
285 |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
286 end |
9ce6d939dfae
Start experimenting with allocation testing
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
287 end |