Skip to content

Commit 3128d9e

Browse files
committed
merge fulltests
1 parent b24b7ec commit 3128d9e

13 files changed

+386
-652
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ julia:
1111
matrix:
1212
allow_failures:
1313
- julia: nightly
14-
- os: osx
1514
notifications:
1615
email: false
1716
after_script:

test/FullPDETest.jl

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

test/FullSingularitiesTest.jl

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

test/JacobiTest.jl

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,74 @@ using ApproxFunOrthogonalPolynomials, ApproxFunBase, Test, StaticArrays, Special
164164
space(reverseorientation(f))
165165
@test f(0.1) (R*f)(0.1) reverseorientation(f)(0.1)
166166
end
167+
168+
@testset "Full Jacobi" begin
169+
sp = Jacobi(.5,2.124)
170+
f = Fun(exp,sp)
171+
sp2 = Jacobi(1.5,2.124)
172+
M = Multiplication(f,sp2)
173+
@time testbandedoperator(M)
174+
175+
176+
## Legendre conversions
177+
testspace(Ultraspherical(1); haslineintegral=false)
178+
testspace(Ultraspherical(2); haslineintegral=false)
179+
# minpoints is a tempory fix a bug
180+
@time testspace(Ultraspherical(1//2); haslineintegral=false, minpoints=2)
181+
@test norm(Fun(exp,Ultraspherical(1//2))-Fun(exp,Jacobi(0,0))) < 100eps()
182+
183+
C=Conversion(Jacobi(0,0),Chebyshev())
184+
@time testbandedbelowoperator(C)
185+
@test norm(C*Fun(exp,Jacobi(0,0)) - Fun(exp)) < 100eps()
186+
187+
188+
C=Conversion(Ultraspherical(1//2),Chebyshev())
189+
@time testbandedbelowoperator(C)
190+
@test norm(C*Fun(exp,Ultraspherical(1//2)) - Fun(exp)) < 100eps()
191+
192+
193+
194+
C=Conversion(Chebyshev(),Ultraspherical(1//2))
195+
@time testbandedbelowoperator(C)
196+
@test norm(C*Fun(exp)-Fun(exp,Legendre())) < 100eps()
197+
198+
199+
C=Conversion(Chebyshev(),Jacobi(0,0))
200+
@time testbandedbelowoperator(C)
201+
@test norm(C*Fun(exp) - Fun(exp,Jacobi(0,0))) < 100eps()
202+
203+
204+
C=Conversion(Chebyshev(),Jacobi(1,1))
205+
@time testbandedbelowoperator(C)
206+
@test norm(C*Fun(exp) - Fun(exp,Jacobi(1,1))) < 100eps()
207+
208+
209+
C=Conversion(Ultraspherical(1//2),Ultraspherical(1))
210+
@time testbandedbelowoperator(C)
211+
212+
λ1 = ApproxFunOrthogonalPolynomials.order(domainspace(C))
213+
λ2 = ApproxFunOrthogonalPolynomials.order(rangespace(C))
214+
215+
# test against version that doesn't use lgamma
216+
Cex = Float64[(if j k && iseven(k-j)
217+
gamma(λ2)*(k-1+λ2)/(gamma(λ1)*gamma(λ1-λ2))*
218+
(gamma((j-k)/2+λ1-λ2)/gamma((j-k)/2+1))*
219+
(gamma((k+j-2)/2+λ1)/gamma((k+j-2)/2+λ2+1))
220+
else
221+
0.0
222+
end) for k=1:20,j=1:20]
223+
224+
@test norm(Cex - C[1:20,1:20]) < 100eps()
225+
226+
@test norm(C*Fun(exp,Ultraspherical(1//2))-Fun(exp,Ultraspherical(1))) < 100eps()
227+
228+
C=Conversion(Jacobi(0,0),Ultraspherical(1))
229+
testbandedbelowoperator(C)
230+
@test norm(C*Fun(exp,Jacobi(0,0))-Fun(exp,Ultraspherical(1))) < 100eps()
231+
232+
233+
C=Conversion(Ultraspherical(1),Jacobi(0,0))
234+
testbandedbelowoperator(C)
235+
@test norm(C*Fun(exp,Ultraspherical(1))-Fun(exp,Jacobi(0,0))) < 100eps()
236+
end
167237
end

0 commit comments

Comments
 (0)