Skip to content

Commit 826a9ee

Browse files
authored
Don't import deprecated DomainSets functions (#307)
* Don't overwrite DomainSets functions * remove deprecated imports * compare factors in tensorspace equality
1 parent 737eb81 commit 826a9ee

File tree

7 files changed

+11
-17
lines changed

7 files changed

+11
-17
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFunBase"
22
uuid = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
3-
version = "0.7.46"
3+
version = "0.7.47"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/ApproxFunBase.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ using Base, BlockArrays, BandedMatrices, BlockBandedMatrices, DomainSets,
44
IntervalSets, SpecialFunctions, AbstractFFTs, FFTW,
55
SpecialFunctions, DSP, DualNumbers, LinearAlgebra, SparseArrays,
66
LowRankApprox, FillArrays, InfiniteArrays, InfiniteLinearAlgebra
7-
# Arpack
87

98
import StaticArrays, Calculus
109
using StaticArrays: SVector, @SArray, SArray
1110

1211
import DomainSets: Domain, indomain, UnionDomain, ProductDomain, Point, ∂,
13-
elements, DifferenceDomain, Interval, ChebyshevInterval, boundary,
12+
SetdiffDomain, Interval, ChebyshevInterval, boundary,
1413
rightendpoint, leftendpoint, dimension, WrappedDomain, VcatDomain,
15-
component, components, ncomponents
14+
component, components, ncomponents, factor, factors, nfactors,
15+
canonicaldomain
1616

1717
using AbstractFFTs: Plan
1818

src/Domains/Domains.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ end
3131
function Base.setdiff(d::SegmentDomain,p::Point)
3232
x = Number(p)
3333
(x d || x leftendpoint(d) || x rightendpoint(d)) && return d
34-
DifferenceDomain(d,p)
34+
SetdiffDomain(d,p)
3535
end
3636

3737

@@ -41,7 +41,7 @@ end
4141
include("multivariate.jl")
4242

4343
affine_setdiff(d::Domain, ptsin::UnionDomain) =
44-
_affine_setdiff(d, Number.(elements(ptsin)))
44+
_affine_setdiff(d, Number.(components(ptsin)))
4545

4646
affine_setdiff(d::Domain, ptsin::WrappedDomain{<:AbstractVector}) =
4747
_affine_setdiff(d, ptsin.domain)

src/Domains/ProductDomain.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
2-
nfactors(d::ProductDomain) = length(components(d))
3-
factors(d::ProductDomain) = components(d)
4-
factor(d::ProductDomain,k::Integer) = component(d,k)
5-
6-
canonicaldomain(d::ProductDomain) = ProductDomain(map(canonicaldomain,factors(d))...)
7-
8-
91
# product domains are their own canonical domain
102
for OP in (:fromcanonical,:tocanonical)
113
@eval begin

src/Multivariate/TensorSpace.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ TensorSpace(sp::Tuple) =
304304
dimension(sp::TensorSpace) = mapreduce(dimension,*,sp.spaces)
305305

306306
==(A::TensorSpace{<:NTuple{N,Space}}, B::TensorSpace{<:NTuple{N,Space}}) where {N} =
307-
all(((a,b),) -> a == b, zip(factors(A), factors(B)))
307+
factors(A) == factors(B)
308308

309309
conversion_rule(a::TensorSpace{<:NTuple{2,Space}}, b::TensorSpace{<:NTuple{2,Space}}) =
310310
conversion_type(a.spaces[1],b.spaces[1]) conversion_type(a.spaces[2],b.spaces[2])

src/PDE/KroneckerOperator.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ Base.transpose(S::ConstantTimesOperator) = sp.c*transpose(S.op)
255255
### Calculus
256256

257257
#TODO: general dimension
258-
function Derivative(S::TensorSpace{SV,DD}, order) where {SV,DD<:EuclideanDomain{2}}
258+
function Derivative(S::TensorSpace{<:Any,<:EuclideanDomain{2}}, order)
259259
@assert length(order)==2
260260
if order[1]==0
261261
Dy=Derivative(S.spaces[2],order[2])
@@ -272,7 +272,7 @@ function Derivative(S::TensorSpace{SV,DD}, order) where {SV,DD<:EuclideanDomain{
272272
T=promote_type(eltype(Dx),eltype(Dy))
273273
end
274274
# try to work around type inference
275-
DerivativeWrapper{typeof(K),typeof(S),Vector{Int},T}(K,order)
275+
DerivativeWrapper{typeof(K),typeof(S),typeof(order),T}(K,order)
276276
end
277277

278278

test/SpacesTest.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ using LinearAlgebra
265265
@test ApproxFunBase.spacescompatible(a, a)
266266
b = PointSpace(1:4) PointSpace(1:3)
267267
@test !ApproxFunBase.spacescompatible(a, b)
268+
@test a == a
269+
@test a != b
268270
end
269271
end
270272

0 commit comments

Comments
 (0)