Skip to content

Commit 0520479

Browse files
committed
Finish Julia v0.7
1 parent 5014263 commit 0520479

File tree

5 files changed

+30
-24
lines changed

5 files changed

+30
-24
lines changed

REQUIRE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ FastGaussQuadrature 0.3
77
RecipesBase 0.5.0
88
FastTransforms 0.4.1
99
StaticArrays 0.3
10+
SpecialFunctions 0.6

src/DiskSpace.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export DiskSpace
44

55

66

7-
struct DiskSpace{m,a,b,JS,S} <: AbstractProductSpace{Tuple{JS,S},Complex128,2}
7+
struct DiskSpace{m,a,b,JS,S} <: AbstractProductSpace{Tuple{JS,S},ComplexF64,2}
88
domain::Disk
99
spacet::S
1010
DiskSpace(d,sp)=new(d,sp)

src/MultivariateOrthogonalPolynomials.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ __precompile__()
33
module MultivariateOrthogonalPolynomials
44
using Base, RecipesBase, ApproxFun, BandedMatrices, BlockArrays,
55
FastTransforms, FastGaussQuadrature, StaticArrays, FillArrays,
6-
Libdl
6+
Libdl, SpecialFunctions
77

88
# package code goes here
99
import Base: values,getindex,setindex!,*,.*,+,.+,-,.-,==,<,<=,>,
@@ -40,7 +40,7 @@ import ApproxFun: PolynomialSpace, ConstantSpace, NoSpace, prectype,
4040
isambiguous, fromcanonical, tocanonical, checkpoints, ∂, spacescompatible,
4141
mappoint, UnivariateSpace, setdomain, setcanonicaldomain, canonicaldomain,
4242
Space, points, space, conversion_rule, maxspace_rule,
43-
union_rule, coefficients, RealUnivariateSpace, PiecewiseSegment, rangetype
43+
union_rule, coefficients, RealUnivariateSpace, PiecewiseSegment, rangetype, cfstype
4444

4545
# Multivariate import
4646
import ApproxFun: BivariateDomain,DirectSumSpace, AbstractProductSpace, factor,

src/Triangle.jl

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ DuffyTriangle(S::KoornwinderTriangle) = DuffyTriangle(Chebyshev(0..1)*Jacobi(S.
135135

136136
function points(S::DuffyTriangle, N)
137137
pts = points(S.space, N)
138-
fromcanonical.(S.domain, iduffy.(pts))
138+
fromcanonical.(Ref(S.domain), iduffy.(pts))
139139
end
140140

141141
plan_transform(S::DuffyTriangle, n::AbstractVector) = TransformPlan(S, plan_transform(S.space,n), Val{false})
@@ -195,7 +195,7 @@ end
195195

196196
function trivec(F̌)
197197
N = size(F̌,1)
198-
v = Array{eltype(F̌)}(N*(N+1) ÷2)
198+
v = Array{eltype(F̌)}(undef, N*(N+1) ÷2)
199199
j = 1
200200
for n=0:N-1, k=0:n
201201
v[j] = F̌[n-k+1,k+1]
@@ -424,7 +424,7 @@ end
424424
# TODO: replace with RaggedMatrix
425425
function totree(S,f::Fun)
426426
N=block(S,ncoefficients(f))
427-
ret = Array{Vector{eltype(f)}}(Int(N))
427+
ret = Array{Vector{cfstype(f)}}(undef,Int(N))
428428
for K=Block(1):N
429429
ret[Int(K)]=coefficient(f,K)
430430
end
@@ -552,8 +552,8 @@ function Base.convert(::Type{BandedBlockBandedMatrix},
552552
D = parent(S)
553553
sp=domainspace(D)
554554
α,β,γ = sp.α,sp.β,sp.γ
555-
K_sh = first(parentindexes(S)[1])-1
556-
J_sh = first(parentindexes(S)[2])-1
555+
K_sh = first(parentindices(S)[1])-1
556+
J_sh = first(parentindices(S)[2])-1
557557
N,M=nblocks(ret)::Tuple{Int,Int}
558558

559559
if D.order == [1,0]
@@ -715,8 +715,8 @@ function Base.convert(::Type{BandedBlockBandedMatrix},S::SubOperator{T,ConcreteC
715715
K1=domainspace(parent(S))
716716
K2=rangespace(parent(S))
717717
α,β,γ = K1.α,K1.β,K1.γ
718-
K_sh = first(parentindexes(S)[1])-1
719-
J_sh = first(parentindexes(S)[2])-1
718+
K_sh = first(parentindices(S)[1])-1
719+
J_sh = first(parentindices(S)[2])-1
720720
N,M=nblocks(ret)::Tuple{Int,Int}
721721

722722
if K2.α == α+1 && K2.β == β && K2.γ == γ
@@ -855,8 +855,8 @@ struct Lowering{k,S,T} <: Operator{T}
855855
space::S
856856
end
857857

858-
Base.convert(::Type{Lowering{k}},sp) where k = Lowering{k,typeof(sp),prectype(sp)}(sp)
859-
Base.convert(::Type{Operator{T}},J::Lowering{x,S}) where {x,T,S} = Lowering{x,S,T}(J.space)
858+
Lowering{k}(sp) where k = Lowering{k,typeof(sp),prectype(sp)}(sp)
859+
Base.convert(::Type{Operator{T}}, J::Lowering{x,S}) where {x,T,S} = Lowering{x,S,T}(J.space)
860860

861861

862862
domainspace(R::Lowering) = R.space
@@ -951,8 +951,8 @@ function Base.convert(::Type{BandedBlockBandedMatrix},S::SubOperator{T,Lowering{
951951
ret = BandedBlockBandedMatrix(Zeros, S)
952952
R = parent(S)
953953
α,β,γ=R.space.α,R.space.β,R.space.γ
954-
K_sh = first(parentindexes(S)[1])-1
955-
J_sh = first(parentindexes(S)[2])-1
954+
K_sh = first(parentindices(S)[1])-1
955+
J_sh = first(parentindices(S)[2])-1
956956
N,M=nblocks(ret)::Tuple{Int,Int}
957957

958958
for KK=Block.(1:N)
@@ -984,8 +984,8 @@ function Base.convert(::Type{BandedBlockBandedMatrix},S::SubOperator{T,Lowering{
984984
ret = BandedBlockBandedMatrix(Zeros,S)
985985
R = parent(S)
986986
α,β,γ=R.space.α,R.space.β,R.space.γ
987-
K_sh = first(parentindexes(S)[1])-1
988-
J_sh = first(parentindexes(S)[2])-1
987+
K_sh = first(parentindices(S)[1])-1
988+
J_sh = first(parentindices(S)[2])-1
989989
N,M = nblocks(ret)::Tuple{Int,Int}
990990

991991

@@ -1022,8 +1022,8 @@ function Base.convert(::Type{BandedBlockBandedMatrix},S::SubOperator{T,Lowering{
10221022
ret = BandedBlockBandedMatrix(Zeros,S)
10231023
R = parent(S)
10241024
α,β,γ=R.space.α,R.space.β,R.space.γ
1025-
K_sh = first(parentindexes(S)[1])-1
1026-
J_sh = first(parentindexes(S)[2])-1
1025+
K_sh = first(parentindices(S)[1])-1
1026+
J_sh = first(parentindices(S)[2])-1
10271027
N,M=nblocks(ret)::Tuple{Int,Int}
10281028

10291029
for KK=Block.(1:N)

src/c_tri2cheb.jl

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
1-
const libfasttransforms = "/Users/solver/Projects/FastTransforms/libfasttransforms"
1+
const libfasttransforms = homedir() * "/Projects/FastTransforms/libfasttransforms"
22

33
struct ft_plan_struct end
44
const PlanPtr = Ptr{ft_plan_struct}
55

6+
function c_plan_tri2cheb end
7+
function c_tri2cheb end
8+
function c_cheb2tri end
69

710
if Libdl.find_library(libfasttransforms) libfasttransforms
811
c_plan_sph2fourier(n::Int) = ccall((:plan_sph2fourier, libfasttransforms), PlanPtr, (Int64, ), n)
9-
fc_sph2fourier(P::PlanPtr, A::Matrix{Float64}) = ccall((:execute_sph2fourier, libfasttransforms), Void, (PlanPtr, Ptr{Float64}, Int64, Int64), P, A, size(A, 1), size(A, 2))
12+
fc_sph2fourier(P::PlanPtr, A::Matrix{Float64}) = ccall((:execute_sph2fourier, libfasttransforms), Nothing, (PlanPtr, Ptr{Float64}, Int64, Int64), P, A, size(A, 1), size(A, 2))
1013

1114
c_plan_rottriangle(n::Int, α::Float64, β::Float64, γ::Float64) = ccall((:plan_rottriangle, libfasttransforms), PlanPtr, (Int64, Float64, Float64, Float64), n, α, β, γ)
12-
c_execute_tri_hi2lo(P::PlanPtr, A::Matrix{Float64}) = ccall((:execute_tri_hi2lo, libfasttransforms), Void, (PlanPtr, Ptr{Float64}, Int64), P, A, size(A, 2))
13-
c_execute_tri_lo2hi(P::PlanPtr, A::Matrix{Float64}) = ccall((:execute_tri_lo2hi, libfasttransforms), Void, (PlanPtr, Ptr{Float64}, Int64), P, A, size(A, 2))
15+
c_execute_tri_hi2lo(P::PlanPtr, A::Matrix{Float64}) = ccall((:execute_tri_hi2lo, libfasttransforms), Nothing, (PlanPtr, Ptr{Float64}, Int64), P, A, size(A, 2))
16+
c_execute_tri_lo2hi(P::PlanPtr, A::Matrix{Float64}) = ccall((:execute_tri_lo2hi, libfasttransforms), Nothing, (PlanPtr, Ptr{Float64}, Int64), P, A, size(A, 2))
1417

1518
c_plan_tri2cheb(n::Int, α::Float64, β::Float64, γ::Float64) = ccall((:plan_tri2cheb, libfasttransforms), PlanPtr, (Int64, Float64, Float64, Float64), n, α, β, γ)
16-
c_tri2cheb(P::PlanPtr, A::Matrix{Float64}) = ccall((:execute_tri2cheb, libfasttransforms), Void, (PlanPtr, Ptr{Float64}, Int64, Int64), P, A, size(A, 1), size(A, 2))
17-
c_cheb2tri(P::PlanPtr, A::Matrix{Float64}) = ccall((:execute_cheb2tri, libfasttransforms), Void, (PlanPtr, Ptr{Float64}, Int64, Int64), P, A, size(A, 1), size(A, 2))
19+
c_tri2cheb(P::PlanPtr, A::Matrix{Float64}) = ccall((:execute_tri2cheb, libfasttransforms), Nothing, (PlanPtr, Ptr{Float64}, Int64, Int64), P, A, size(A, 1), size(A, 2))
20+
c_cheb2tri(P::PlanPtr, A::Matrix{Float64}) = ccall((:execute_cheb2tri, libfasttransforms), Nothing, (PlanPtr, Ptr{Float64}, Int64, Int64), P, A, size(A, 1), size(A, 2))
21+
else
22+
warn("Cannot load FastTransforms Dylib")
1823
end
1924

2025
struct CTri2ChebPlan

0 commit comments

Comments
 (0)