Skip to content

Commit f581125

Browse files
committed
Move over PointSpace
1 parent 7f1c579 commit f581125

File tree

13 files changed

+1097
-145
lines changed

13 files changed

+1097
-145
lines changed

src/ApproxFunBase.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ include("Operators/Operator.jl")
111111
include("Caching/caching.jl")
112112
include("PDE/PDE.jl")
113113
include("Spaces/Spaces.jl")
114+
include("hacks.jl")
114115
include("testing.jl")
116+
include("specialfunctions.jl")
115117

116118
end #module

src/Fun.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,8 @@ function differentiate(f::Fun,k::Integer)
457457
(k==0) ? f : differentiate(differentiate(f),k-1)
458458
end
459459

460+
# use conj(transpose(f)) for ArraySpace
461+
adjoint(f::Fun) = differentiate(f)
460462

461463

462464

src/LinearAlgebra/LinearAlgebra.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ include("lyap.jl")
99
include("bary.jl")
1010
include("clenshaw.jl")
1111
include("ultraspherical.jl")
12-
include("fourier.jl")
1312

1413
include("hesseneigs.jl")
1514

src/LinearAlgebra/fourier.jl

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

src/Operators/functionals/Evaluation.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ bvp(d,k) = vcat(Operator{prectype(d)}[ldiffbc(d,i) for i=0:div(k,2)-1],
129129

130130
periodic(d,k) = Operator{prectype(d)}[Evaluation(d,leftendpoint,i)-Evaluation(d,rightendpoint,i) for i=0:k]
131131

132+
# shorthand for second order
133+
ivp(d) = ivp(d,2)
134+
bvp(d) = bvp(d,2)
135+
132136

133137

134138
for op in (:rdirichlet,:ldirichlet,:lneumann,:rneumann,:ivp,:bvp)

src/Spaces/ConstantSpace.jl

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -245,64 +245,4 @@ Base.isfinite(f::Fun{CS}) where {CS<:ConstantSpace} = isfinite(Number(f))
245245

246246

247247

248-
## ConstantSpace and PointSpace default overrides
249-
250-
for SP in (:ConstantSpace,)
251-
for OP in (:abs,:sign,:exp,:sqrt,:angle)
252-
@eval begin
253-
$OP(z::Fun{<:$SP,<:Complex}) = Fun(space(z),$OP.(coefficients(z)))
254-
$OP(z::Fun{<:$SP,<:Real}) = Fun(space(z),$OP.(coefficients(z)))
255-
$OP(z::Fun{<:$SP}) = Fun(space(z),$OP.(coefficients(z)))
256-
end
257-
end
258-
259-
# we need to pad coefficients since 0^0 == 1
260-
for OP in (:^,)
261-
@eval begin
262-
function $OP(z::Fun{<:$SP},k::Integer)
263-
k  0 && return Fun(space(z),$OP.(coefficients(z),k))
264-
Fun(space(z),$OP.(pad(coefficients(z),dimension(space(z))),k))
265-
end
266-
function $OP(z::Fun{<:$SP},k::Number)
267-
k  0 && return Fun(space(z),$OP.(coefficients(z),k))
268-
Fun(space(z),$OP.(pad(coefficients(z),dimension(space(z))),k))
269-
end
270-
end
271-
end
272-
end
273248

274-
275-
for OP in (:(Base.max),:(Base.min))
276-
@eval begin
277-
$OP(a::Fun{CS1,T},b::Fun{CS2,V}) where {CS1<:ConstantSpace,CS2<:ConstantSpace,T<:Real,V<:Real} =
278-
Fun($OP(Number(a),Number(b)),space(a) space(b))
279-
$OP(a::Fun{CS,T},b::Real) where {CS<:ConstantSpace,T<:Real} =
280-
Fun($OP(Number(a),b),space(a))
281-
$OP(a::Real,b::Fun{CS,T}) where {CS<:ConstantSpace,T<:Real} =
282-
Fun($OP(a,Number(b)),space(b))
283-
end
284-
end
285-
286-
for OP in (:<,:(Base.isless),:(<=),:>,:(>=))
287-
@eval begin
288-
$OP(a::Fun{CS},b::Fun{CS}) where {CS<:ConstantSpace} = $OP(convert(Number,a),Number(b))
289-
$OP(a::Fun{CS},b::Number) where {CS<:ConstantSpace} = $OP(convert(Number,a),b)
290-
$OP(a::Number,b::Fun{CS}) where {CS<:ConstantSpace} = $OP(a,convert(Number,b))
291-
end
292-
end
293-
294-
# from DualNumbers
295-
for (funsym, exp) in Calculus.symbolic_derivatives_1arg()
296-
funsym == :abs && continue
297-
funsym == :sign && continue
298-
funsym == :exp && continue
299-
funsym == :sqrt && continue
300-
@eval begin
301-
$(funsym)(z::Fun{CS,T}) where {CS<:ConstantSpace,T<:Real} =
302-
Fun($(funsym)(Number(z)),space(z))
303-
$(funsym)(z::Fun{CS,T}) where {CS<:ConstantSpace,T<:Complex} =
304-
Fun($(funsym)(Number(z)),space(z))
305-
$(funsym)(z::Fun{CS}) where {CS<:ConstantSpace} =
306-
Fun($(funsym)(Number(z)),space(z))
307-
end
308-
end

0 commit comments

Comments
 (0)