We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c60cf51 commit c19fc31Copy full SHA for c19fc31
Project.toml
@@ -25,11 +25,11 @@ QuasiArrays = "c4ea9172-b204-11e9-377d-29865faadc5c"
25
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
26
27
[compat]
28
-ArrayLayouts = "0.6.2"
+ArrayLayouts = "0.6.2, 0.7"
29
BandedMatrices = "0.16.5"
30
BlockArrays = "0.15"
31
BlockBandedMatrices = "0.10"
32
-ContinuumArrays = "0.7.2"
+ContinuumArrays = "0.7.3"
33
DomainSets = "0.4, 0.5"
34
FFTW = "1.1"
35
FastGaussQuadrature = "0.4.3"
examples/ultrasphericalspectralmethod.jl
@@ -1,14 +1,11 @@
1
-using ContinuumArrays, FillArrays, InfiniteArrays, Plots
+using ClassicalOrthogonalPolynomials, Plots
2
3
T = Chebyshev()
4
C = Ultraspherical(2)
5
D = Derivative(axes(T,1))
6
A = (C\(D^2*T))+100(C\T)
7
8
-n = 100
9
-c = [T[[-1,1],1:n]; A[1:n-2,1:n]] \ [1;2;zeros(n-2)]
10
-u = T*Vcat(c,Zeros(∞))
11
-
12
-xx = range(-1,1;length=1000)
13
-plot(xx,u[xx])
+c = Vcat(T[[-1,1],:], A) \ [1;2;zeros(∞)]
+u = T*c
14
+plot(u)
src/ClassicalOrthogonalPolynomials.jl
@@ -28,7 +28,7 @@ import QuasiArrays: cardinality, checkindex, QuasiAdjoint, QuasiTranspose, Inclu
import InfiniteArrays: OneToInf, InfAxes, Infinity, AbstractInfUnitRange, InfiniteCardinal, InfRanges
import ContinuumArrays: Basis, Weight, basis, @simplify, Identity, AbstractAffineQuasiVector, ProjectionFactorization,
- inbounds_getindex, grid, transform, transform_ldiv, TransformFactorization, QInfAxes, broadcastbasis, Expansion,
+ inbounds_getindex, grid, plotgrid, transform, transform_ldiv, TransformFactorization, QInfAxes, broadcastbasis, Expansion,
AffineQuasiVector, AffineMap, WeightLayout, WeightedBasisLayout, WeightedBasisLayouts, demap, AbstractBasisLayout, BasisLayout,
checkpoints, weight, unweightedbasis, MappedBasisLayouts, __sum
import FastTransforms: Λ, forwardrecurrence, forwardrecurrence!, _forwardrecurrence!, clenshaw, clenshaw!,
src/classical/jacobi.jl
@@ -207,6 +207,12 @@ function grid(Pn::SubQuasiArray{T,2,<:AbstractJacobi,<:Tuple{Inclusion,AbstractU
207
ChebyshevGrid{1,T}(maximum(jr))
208
end
209
210
+function plotgrid(Pn::SubQuasiArray{T,2,<:AbstractJacobi,<:Tuple{Inclusion,AbstractUnitRange}}) where T
211
+ kr,jr = parentindices(Pn)
212
+ ChebyshevGrid{2,T}(40maximum(jr))
213
+end
214
+
215
216
function ldiv(::Legendre{V}, f::AbstractQuasiVector) where V
217
T = ChebyshevT{V}()
218
[cheb2leg(paddeddata(T \ f)); zeros(V,∞)]
test/test_chebyshev.jl
@@ -356,6 +356,10 @@ import ContinuumArrays: MappedWeightedBasisLayout, Map
356
V = view(T,:,[1,3,4])
357
@test (U\(D*V))[1:5,:] == (U \ (V'D')')[1:5,:] == (U\(D*T))[1:5,[1,3,4]]
358
359
360
+ @testset "plot" begin
361
+ @test ContinuumArrays.plotgrid(ChebyshevT()[:,1:5]) == ChebyshevGrid{2}(200)
362
+ end
363
364
365
struct QuadraticMap{T} <: Map{T} end
0 commit comments