Skip to content

Commit 42e1ae5

Browse files
committed
use invdiagtrav
1 parent 811f506 commit 42e1ae5

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/rect.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ ApplyPlan(f, P) = ApplyPlan{eltype(P), typeof(f), typeof(P)}(f, P)
9292
*(A::ApplyPlan, B::AbstractArray) = A.f(A.plan*B)
9393

9494
basis_axes(d::Inclusion{<:Any,<:ProductDomain}, v) = KronPolynomial(map(d -> basis(Inclusion(d)),components(d.domain))...)
95+
basis_axes(d::Inclusion{<:Any,<:DomainSets.FixedIntervalProduct{N,T,D}}, v) where {N,T,D} = KronPolynomial(Fill(basis(Inclusion(D())), N))
9596

9697
struct TensorPlan{T, Plans}
9798
plans::Plans
@@ -167,9 +168,9 @@ end
167168

168169
## Special Legendre case
169170

170-
function transform_ldiv(K::KronPolynomial{d,V,<:Fill{<:Legendre}}, f::Union{AbstractQuasiVector,AbstractQuasiMatrix}) where {d,V}
171+
function transform_ldiv(K::KronPolynomial{d,V,<:Fill{<:Legendre}}, f::AbstractQuasiVector) where {d,V}
171172
T = KronPolynomial{d}(Fill(ChebyshevT{V}(), size(K.args)...))
172-
dat = (T \ f).array
173+
dat = invdiagtrav(T \ f)
173174
DiagTrav(pad(FastTransforms.th_cheb2leg(paddeddata(dat)), axes(dat)...))
174175
end
175176

test/test_rect.jl

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using MultivariateOrthogonalPolynomials, ClassicalOrthogonalPolynomials, StaticArrays, LinearAlgebra, BlockArrays, FillArrays, Base64, LazyBandedMatrices, ArrayLayouts, Random, StatsBase, Test
2-
using ClassicalOrthogonalPolynomials: expand, coefficients, recurrencecoefficients
2+
using ClassicalOrthogonalPolynomials: expand, coefficients, recurrencecoefficients, normalized
33
using MultivariateOrthogonalPolynomials: weaklaplacian, ClenshawKron
44
using ContinuumArrays: plotgridvalues, ExpansionLayout, basis, grid
55
using Base: oneto
@@ -285,11 +285,8 @@ Random.seed!(3242)
285285
@test A[SVector(0.1,0.2),1:3] A[SVector(0.1,0.2),:] [1,0.1,0.2]
286286

287287
P = basis(x)
288-
P\A
289-
290-
291-
B[0.1,:]
292-
293-
P \ A
288+
@test P\A [I(3); Zeros(∞,3)]
289+
normalized(P) \ A
290+
qr(A)
294291
end
295292
end

0 commit comments

Comments
 (0)