Skip to content

Commit 6c6ffd3

Browse files
committed
LazyArrays v0.10 support
1 parent d61c6ca commit 6c6ffd3

File tree

4 files changed

+23
-18
lines changed

4 files changed

+23
-18
lines changed

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
3030
[compat]
3131
ApproxFun = "0.11"
3232
ApproxFunBase = "0.1"
33-
BandedMatrices = "0.9"
33+
BandedMatrices = "0.10"
3434
BlockArrays = "0.9"
3535
DomainSets = "0.0.2, 0.1"
3636
FastGaussQuadrature = "≥ 0.3.0"
3737
FastTransforms = "≥ 0.4.1"
3838
FillArrays = "≥ 0.5"
3939
InfiniteArrays = "0.1"
40-
LazyArrays = "0.8, 0.9"
40+
LazyArrays = "0.10"
4141
RecipesBase = "≥ 0.5.0"
4242
SpecialFunctions = "≥ 0.6.0"
4343
StaticArrays = "≥ 0.3.0"
44-
julia = "0.7, 1"
44+
julia = "1"

src/clenshaw.jl

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ function ClenshawRecurrenceData{T,S}(sp::S, N) where {T,S<:JacobiTriangle}
4747
Cx,Cy = view(Jx,Block(K-1,K)), view(Jy,Block(K-1,K))
4848
C[K-1] = BandedMatrix{T}(undef, (K-1,K+1), (0,2))
4949
B̃ˣ[K][end-1,end] = - inv(b₂) * By[K-1,K]/Bx[K-1,K-1]
50-
C[K-1] .= Mul(Cx , B̃ˣ[K])
51-
C[K-1] .= Mul(Cy, B̃ʸ[K]) .+ C[K-1]
50+
C[K-1] .= @~ Cx * B̃ˣ[K]
51+
C[K-1] .= @~ Cy*B̃ʸ[K] + C[K-1]
5252
end
5353

54-
B[K] .= Mul(Ax, B̃ˣ[K])
55-
B[K] .= Mul(Ay, B̃ʸ[K]) .+ B[K]
54+
B[K] .= @~ Ax * B̃ˣ[K]
55+
B[K] .= @~ Ay * B̃ʸ[K] + B[K]
5656
end
5757

5858
ClenshawRecurrenceData{T,S}(sp, B̃ˣ, B̃ʸ, B, C)
@@ -161,9 +161,13 @@ function BandedBlockBandedMatrix(V::SubOperator{T,<:ClenshawMultiplication,Tuple
161161

162162
Q = BandedBlockBandedMatrix(Eye{eltype(Jx)}(size(Jx)...), blocksizes(Jx), (0,0), (0,0))
163163
B2 = Fill(Q,N) .* view(cfs,Block(N))
164-
B1 = Fill(Q,N-1) .* view(cfs,Block(N-1)) .+ Fill(Jx,N-1) .* (C.B̃ˣ[N-1]*B2) .+ Fill(Jy,N-1) .* (C.B̃ʸ[N-1]*B2) .- C.B[N-1]*B2
165-
for K = N-2:-1:1
166-
B1, B2 = Fill(Q,K) .* view(cfs,Block(K)) .+ Fill(Jx,K) .* (C.B̃ˣ[K]*B1) .+ Fill(Jy,K) .* (C.B̃ʸ[K]*B1) .- C.B[K]*B1 .- C.C[K] * B2 , B1
164+
if N == 1
165+
B1 = B2
166+
else
167+
B1 = Fill(Q,N-1) .* view(cfs,Block(N-1)) .+ Fill(Jx,N-1) .* (C.B̃ˣ[N-1]*B2) .+ Fill(Jy,N-1) .* (C.B̃ʸ[N-1]*B2) .- C.B[N-1]*B2
168+
for K = N-2:-1:1
169+
B1, B2 = Fill(Q,K) .* view(cfs,Block(K)) .+ Fill(Jx,K) .* (C.B̃ˣ[K]*B1) .+ Fill(Jy,K) .* (C.B̃ʸ[K]*B1) .- C.B[K]*B1 .- C.C[K] * B2 , B1
170+
end
167171
end
168172

169173

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using ApproxFun, MultivariateOrthogonalPolynomials, Test
22

3-
include("TriangleTest.jl")
4-
include("DirichletTriangleTest.jl")
3+
include("test_triangle.jl")
4+
include("test_dirichlettriangle.jl")
55

66

77
## bessel

test/test_triangle.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
using StaticArrays, BandedMatrices, FastTransforms,
2-
ApproxFun, MultivariateOrthogonalPolynomials, LinearAlgebra, Test
3-
import MultivariateOrthogonalPolynomials: Lowering, DuffyTriangle,
4-
clenshaw, block, TriangleWeight,plan_evaluate, weight
5-
import ApproxFun: testbandedblockbandedoperator, Block, BandedBlockBandedMatrix, blockcolrange, blocksize,
6-
Vec, jacobip, plan_transform
2+
ApproxFunBase, ApproxFunOrthogonalPolynomials, ApproxFun,
3+
MultivariateOrthogonalPolynomials, LinearAlgebra, Test
4+
import MultivariateOrthogonalPolynomials: Lowering, DuffyTriangle,
5+
clenshaw, block, TriangleWeight,plan_evaluate, weight
6+
import ApproxFunBase: testbandedblockbandedoperator, Block, BandedBlockBandedMatrix, blockcolrange, blocksize,
7+
Vec, plan_transform
8+
import ApproxFunOrthogonalPolynomials: jacobip
79

810

911
@testset "Triangle domain" begin
@@ -264,7 +266,6 @@ end
264266
testbandedblockbandedoperator(Δ)
265267
end
266268

267-
268269
@testset "Triangle derivatives" begin
269270
K=JacobiTriangle(0,0,0)
270271
f=Fun((x,y)->exp(x*cos(y)),K)

0 commit comments

Comments
 (0)