|
91 | 91 | D = Derivative(axes(L,1))
|
92 | 92 | @test ApplyStyle(*,typeof(D),typeof(L)) isa SimplifyStyle
|
93 | 93 | @test D*L isa MulQuasiMatrix
|
| 94 | + @test length((D*L).args) == 2 |
94 | 95 | @test eltype(D*L) == Float64
|
95 | 96 |
|
96 | 97 | M = applied(*, (D*L).applied.args..., [1,2,4])
|
|
129 | 130 | @test (L'D') isa MulQuasiMatrix
|
130 | 131 |
|
131 | 132 | A = (L'D') * (D*L)
|
| 133 | + @test A isa BandedMatrix |
132 | 134 | @test A == (D*L)'*(D*L) == [1.0 -1 0; -1.0 2.0 -1.0; 0.0 -1.0 1.0]
|
133 | 135 | @test bandwidths(A) == (1,1)
|
134 | 136 | end
|
|
166 | 168 | B = L[:,2:end-1] # Zero dirichlet by dropping first and last spline
|
167 | 169 | D = Derivative(axes(L,1))
|
168 | 170 | Δ = -((D*B)'*(D*B)) # Weak Laplacian
|
| 171 | + @test Δ isa BandedMatrix |
169 | 172 |
|
170 | 173 | @test B'D' isa MulQuasiMatrix
|
171 | 174 | @test length((B'D').args) == 2
|
|
174 | 177 | @test Δ == -(B'D'D*B)
|
175 | 178 | @test Δ == -((B'D')*(D*B))
|
176 | 179 | @test_broken Δ == -B'*(D'D)*B
|
177 |
| - @test_broken Δ == -(B'*(D'D)*B) |
| 180 | + @test Δ == -(B'*(D'D)*B) |
178 | 181 |
|
179 | 182 | f = L*exp.(L.points) # project exp(x)
|
180 | 183 | u = B * (Δ \ (B'f))
|
|
298 | 301 | A = D*W*S[:,1:N]
|
299 | 302 | @test A.args[1] == P
|
300 | 303 | @test P\((D*W)*S[:,1:N]) isa AbstractMatrix
|
| 304 | + @test P\(D*W*S[:,1:N]) isa AbstractMatrix |
301 | 305 |
|
302 | 306 | L = D*W*S
|
303 | 307 | Δ = L'L
|
|
313 | 317 | A = *((L').args..., L.args...)
|
314 | 318 | @test A isa MulQuasiMatrix
|
315 | 319 |
|
316 |
| - Δ = L'L |
317 |
| - @test Δ isa MulMatrix |
318 |
| - @test bandwidths(Δ) == (0,0) |
| 320 | + @test apply(*,L',L) isa QuasiArrays.ApplyQuasiArray |
| 321 | + |
| 322 | + @test_skip Δ = L'L |
| 323 | + @test_skip Δ isa MulMatrix |
| 324 | + @test_skip bandwidths(Δ) == (0,0) |
319 | 325 | end
|
320 | 326 |
|
321 | 327 | @testset "Chebyshev evaluation" begin
|
|
350 | 356 | P = Chebyshev()
|
351 | 357 | D = Derivative(axes(P,1))
|
352 | 358 | n = 300
|
353 |
| - x = cos.((1:n-1) .* π ./ (n-1)) |
| 359 | + x = cos.((0:n-2) .* π ./ (n-2)) |
354 | 360 | cfs = [P[-1,1:n]'; (D*P)[x,1:n] - P[x,1:n]] \ [exp(-1); zeros(n-1)]
|
355 | 361 | u = P[:,1:n]*cfs
|
356 | 362 | @test u[0.1] ≈ exp(0.1)
|
|
0 commit comments