Skip to content

Commit 2b4244f

Browse files
authored
Dl/newfasttransforms (#8)
* Fixes for new FastTransforms * Update test_dirichlettriangle.jl
1 parent ea84cf3 commit 2b4244f

File tree

6 files changed

+33
-110
lines changed

6 files changed

+33
-110
lines changed

Project.toml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ApproxFunFourier = "59844689-9c9d-51bf-9583-5b794ec66d30"
99
ApproxFunOrthogonalPolynomials = "b70543e2-c0d9-56b8-a290-0d4d6d4de211"
1010
BandedMatrices = "aae01518-5342-5314-be14-df237901396f"
1111
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
12+
BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0"
1213
DomainSets = "5b8099bc-c8ec-5219-889f-1d9e522a28bf"
1314
FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838"
1415
FastTransforms = "057dd010-8810-581a-b7be-e3fc3b93f78c"
@@ -29,17 +30,19 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2930

3031
[compat]
3132
ApproxFun = "0.11"
32-
ApproxFunOrthogonalPolynomials = "0.2"
33-
ApproxFunBase = "0.1"
34-
BandedMatrices = "0.10"
35-
BlockArrays = "0.9"
33+
ApproxFunFourier = "0.2"
34+
ApproxFunOrthogonalPolynomials = "0.3"
35+
ApproxFunBase = "0.2.3"
36+
BandedMatrices = "0.14"
37+
BlockArrays = "0.10"
38+
BlockBandedMatrices = "0.6"
3639
DomainSets = "0.1"
37-
FastGaussQuadrature = "0.3"
38-
FastTransforms = "0.5"
39-
FillArrays = "0.6"
40-
InfiniteArrays = "0.1"
41-
LazyArrays = "0.10"
40+
FastGaussQuadrature = "0.4"
41+
FastTransforms = "0.8"
42+
FillArrays = "0.8"
43+
InfiniteArrays = "0.5"
44+
LazyArrays = "0.14"
4245
RecipesBase = "0.5, 0.6, 0.7"
43-
SpecialFunctions = "0.6, 0.7"
44-
StaticArrays = "0.11"
45-
julia = "1"
46+
SpecialFunctions = "0.7, 0.8, 0.9"
47+
StaticArrays = "0.11, 0.12"
48+
julia = "1.3"

src/MultivariateOrthogonalPolynomials.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module MultivariateOrthogonalPolynomials
2-
using Base, RecipesBase, ApproxFun, BandedMatrices, BlockArrays,
2+
using Base, RecipesBase, ApproxFun, BandedMatrices, BlockArrays, BlockBandedMatrices,
33
FastTransforms, FastGaussQuadrature, StaticArrays, FillArrays,
44
LinearAlgebra, Libdl, SpecialFunctions, LazyArrays, InfiniteArrays,
55
DomainSets
@@ -11,7 +11,9 @@ import Base: values,getindex,setindex!,*, +, -, ==,<,<=,>,
1111

1212
import BandedMatrices: inbands_getindex, inbands_setindex!
1313

14-
import BlockArrays: blocksizes, BlockSizes, getblock, global2blockindex
14+
import BlockArrays: blocksizes, BlockSizes, getblock, global2blockindex, Block
15+
16+
import BlockBandedMatrices: blockbandwidths, subblockbandwidths
1517

1618
# ApproxFun general import
1719
import ApproxFunBase: BandedMatrix, blocksize,
@@ -46,9 +48,9 @@ import ApproxFunBase: ConstantSpace, NoSpace, prectype,
4648
# Multivariate import
4749
import ApproxFunBase: DirectSumSpace, AbstractProductSpace, factor,
4850
BivariateFun, ProductFun, LowRankFun, lap, columnspace,
49-
blockbandwidths, subblockbandwidths, fromtensor, totensor, isbandedblockbanded,
51+
fromtensor, totensor, isbandedblockbanded,
5052
Tensorizer, tensorizer, block, blockstart, blockstop, blocklengths,
51-
domaintensorizer, rangetensorizer, blockrange, Block, BlockRange1,
53+
domaintensorizer, rangetensorizer, blockrange, BlockRange1,
5254
float
5355

5456
# Singularities
@@ -63,8 +65,6 @@ import ApproxFunOrthogonalPolynomials: jacobip, JacobiSD, PolynomialSpace, order
6365
import ApproxFunFourier: polar, ipolar
6466

6567

66-
include("c_transforms.jl")
67-
6868
include("Triangle/Triangle.jl")
6969
include("Disk/Disk.jl")
7070
include("Cone/Cone.jl")

src/Triangle/Triangle.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ jacobinorm(n,a,b) = if n ≠ 0
158158
#
159159
#
160160

161-
161+
lgamma(x) = logabsgamma(x)[1]
162162

163163
function trinorm(n,k,a,b,c)
164164
if a == 0 && b == c == -0.5
@@ -231,7 +231,7 @@ function FastJacobiTriangleTransformPlan(S::JacobiTriangle, v::AbstractVector{T}
231231
n = floor(Integer,sqrt(2length(v)) + 1/2)
232232
v = Array{T}(undef, sum(1:n))
233233
FastJacobiTriangleTransformPlan(plan_transform(DuffyTriangle(), v),
234-
CTri2ChebPlan(n,S.α,S.β,S.γ),S.α,S.β,S.γ)
234+
plan_tri2cheb(Float64,n,S.α,S.β,S.γ),S.α,S.β,S.γ)
235235
end
236236

237237
function *(P::FastJacobiTriangleTransformPlan, v)
@@ -280,7 +280,7 @@ function FastJacobiTriangleITransformPlan(S::JacobiTriangle, v::AbstractVector{T
280280
n = floor(Integer,sqrt(2length(v)) + 1/2)
281281
v = Array{T}(undef, sum(1:n))
282282
FastJacobiTriangleITransformPlan(plan_itransform(DuffyTriangle(), v),
283-
CTri2ChebPlan(n,S.α,S.β,S.γ),S.α,S.β,S.γ)
283+
plan_tri2cheb(Float64,n,S.α,S.β,S.γ),S.α,S.β,S.γ)
284284
end
285285

286286
function *(P::FastJacobiTriangleITransformPlan, v)

src/c_transforms.jl

Lines changed: 0 additions & 80 deletions
This file was deleted.

test/test_dirichlettriangle.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using ApproxFun, MultivariateOrthogonalPolynomials, Test, StaticArrays
2-
import MultivariateOrthogonalPolynomials: DirichletTriangle
3-
import ApproxFun: testbandedblockbandedoperator, testblockbandedoperator, Vec
4-
x,y=0.1,0.2
2+
import MultivariateOrthogonalPolynomials: DirichletTriangle
3+
import ApproxFunBase: testbandedblockbandedoperator, testblockbandedoperator, Vec
4+
x,y=0.1,0.2
55

66

77
@testset "Dirchlet conversions" begin

test/test_triangle.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
using StaticArrays, BandedMatrices, FastTransforms,
1+
using StaticArrays, BandedMatrices, BlockArrays, FastTransforms,
22
ApproxFunBase, ApproxFunOrthogonalPolynomials, ApproxFun,
33
MultivariateOrthogonalPolynomials, LinearAlgebra, Test
44
import MultivariateOrthogonalPolynomials: Lowering, DuffyTriangle,
55
clenshaw, block, TriangleWeight,plan_evaluate, weight
66
import ApproxFunBase: testbandedblockbandedoperator, Block, BandedBlockBandedMatrix, blockcolrange, blocksize,
77
Vec, plan_transform
88
import ApproxFunOrthogonalPolynomials: jacobip
9-
9+
import BandedMatrices: colstop
1010

1111
@testset "Triangle domain" begin
1212
d = Triangle()
@@ -137,10 +137,10 @@ end
137137

138138
@test Jy[3,1] 1/3
139139

140-
@test ApproxFun.colstop(Jy,1) == 3
141-
@test ApproxFun.colstop(Jy,2) == 5
142-
@test ApproxFun.colstop(Jy,3) == 6
143-
@test ApproxFun.colstop(Jy,4) == 8
140+
@test colstop(Jy,1) == 3
141+
@test colstop(Jy,2) == 5
142+
@test colstop(Jy,3) == 6
143+
@test colstop(Jy,4) == 8
144144

145145

146146
@test (Jy*f)(0.1,0.2) 0.2exp(0.1*cos(0.2))

0 commit comments

Comments
 (0)