Skip to content

Commit f2729a2

Browse files
authored
Refactor into multiple packages (#658)
* move out files * move out files * Update ApproxFun.jl * move tests back here * using works * Fractional operator types * work on tests * tests pass * ApproxFunSingularities * move nullspace test * Project.toml, NEWS * export sample * `@time` to prevent timeout * More `@time` * Update FractionalTest.jl * Skip fractionaltests for now
1 parent dd31547 commit f2729a2

File tree

164 files changed

+389
-29288
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+389
-29288
lines changed

.DS_Store

6 KB
Binary file not shown.

NEWS.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@
33

44
### notes on release changes, ongoing development, and future planned work
55

6+
#### 0.11
7+
- Split into ApproxFunBase.jl, ApproxFunFourier.jl, ApproxFunOrthogonalPolynomials.jl, and ApproxFunSingularities.jl
8+
9+
#### 0.10.4
10+
- Update for latest BandedMatrices.jl
11+
- Support for symmetric discretizations
12+
- Bug fixes
13+
14+
#### 0.10.3
15+
- Bug fixes
16+
- Update for latest BlockBandedMatrices.jl
17+
18+
#### 0.10.2
19+
- Bug fixes for special functions on large intervals
20+
21+
#### 0.10.1
22+
- Update for latest BlockBandedMatrices.jl
23+
624
#### 0.10.0
725
- Use DomainSets.jl for representing domains
826
- Use InfiniteArrays.jl for representing block sizes

Project.toml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name = "ApproxFun"
2+
uuid = "28f2ccd6-bb30-5033-b560-165f7b14dc2f"
3+
version = "0.11"
4+
5+
[deps]
6+
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
7+
ApproxFunBase = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
8+
ApproxFunFourier = "59844689-9c9d-51bf-9583-5b794ec66d30"
9+
ApproxFunOrthogonalPolynomials = "b70543e2-c0d9-56b8-a290-0d4d6d4de211"
10+
ApproxFunSingularities = "f8fcb915-6b99-5be2-b79a-d6dbef8e6e7e"
11+
BandedMatrices = "aae01518-5342-5314-be14-df237901396f"
12+
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
13+
BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0"
14+
Calculus = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9"
15+
DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2"
16+
DomainSets = "5b8099bc-c8ec-5219-889f-1d9e522a28bf"
17+
DualNumbers = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74"
18+
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
19+
FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838"
20+
FastTransforms = "057dd010-8810-581a-b7be-e3fc3b93f78c"
21+
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
22+
InfiniteArrays = "4858937d-0d70-526a-a4dd-2d5cb5dd786c"
23+
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"
24+
LazyArrays = "5078a376-72f3-5289-bfd5-ec5146d43c02"
25+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
26+
LowRankApprox = "898213cb-b102-5a47-900c-97e73b919f73"
27+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
28+
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
29+
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
30+
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
31+
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
32+
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
33+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
34+
ToeplitzMatrices = "c751599d-da0a-543b-9d20-d0a503d91d24"
35+
36+
[compat]
37+
AbstractFFTs = "≥ 0.3.1"
38+
ApproxFunBase = "≥ 0.0.3"
39+
ApproxFunFourier = "≥ 0.0.1"
40+
ApproxFunSingularities = "≥ 0.0.1"
41+
ApproxFunOrthogonalPolynomails = "≥ 0.0.2"
42+
BandedMatrices = "≥ 0.9.0"
43+
BlockArrays = "≥ 0.8.0"
44+
BlockBandedMatrices = "≥ 0.4.0"
45+
Calculus = "≥ 0.1.15"
46+
DSP = "≥ 0.5.1"
47+
DomainSets = "≥ 0.0.1"
48+
DualNumbers = "≥ 0.4.0"
49+
FFTW = "≥ 0.2.4"
50+
FastGaussQuadrature = "≥ 0.3.2"
51+
FastTransforms = "≥ 0.4.2"
52+
FillArrays = "≥ 0.5.0"
53+
InfiniteArrays = "≥ 0.0.3"
54+
IntervalSets = "≥ 0.3.1"
55+
LazyArrays = "≥ 0.8.0"
56+
LowRankApprox = "≥ 0.1.4"
57+
RecipesBase = "≥ 0.5.0"
58+
Reexport = "≥ 0.2.0"
59+
SpecialFunctions = "≥ 0.7.0"
60+
StaticArrays = "≥ 0.8.3"
61+
ToeplitzMatrices = "≥ 0.4.0"
62+
julia = "≥ 0.7.0"

REQUIRE

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

src/.DS_Store

6 KB
Binary file not shown.

src/ApproxFun.jl

Lines changed: 70 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,60 @@
11
__precompile__()
22

33
module ApproxFun
4-
using Base, RecipesBase, FastGaussQuadrature, FastTransforms, DualNumbers,
5-
BlockArrays, BandedMatrices, BlockBandedMatrices, DomainSets, IntervalSets,
6-
SpecialFunctions, AbstractFFTs, FFTW, SpecialFunctions, DSP,
7-
LinearAlgebra, LowRankApprox, SparseArrays, FillArrays, InfiniteArrays #, Arpack
8-
import StaticArrays, ToeplitzMatrices, Calculus
9-
4+
using Base, Reexport, BlockArrays, BandedMatrices, BlockBandedMatrices, DomainSets, IntervalSets,
5+
SpecialFunctions, AbstractFFTs, FFTW, SpecialFunctions, DSP, DualNumbers, FastTransforms,
6+
LinearAlgebra, SparseArrays, LowRankApprox, FillArrays, InfiniteArrays, RecipesBase,
7+
FFTW, AbstractFFTs #, Arpack
8+
9+
import Calculus
10+
11+
@reexport using ApproxFunBase
12+
@reexport using ApproxFunFourier
13+
@reexport using ApproxFunOrthogonalPolynomials
14+
@reexport using ApproxFunSingularities
15+
16+
import ApproxFunBase: normalize!, flipsign, FiniteRange, Fun, MatrixFun, UnsetSpace, VFun, RowVector,
17+
UnivariateSpace, AmbiguousSpace, SumSpace, SubSpace, WeightSpace, NoSpace, Space,
18+
HeavisideSpace, PointSpace,
19+
IntervalOrSegment, RaggedMatrix, AlmostBandedMatrix,
20+
AnyDomain, ZeroSpace, ArraySpace, TrivialInterlacer, BlockInterlacer,
21+
AbstractTransformPlan, TransformPlan, ITransformPlan,
22+
ConcreteConversion, ConcreteMultiplication, ConcreteDerivative, ConcreteIntegral, CalculusOperator,
23+
ConcreteVolterra, Volterra, VolterraWrapper,
24+
MultiplicationWrapper, ConversionWrapper, DerivativeWrapper, Evaluation, EvaluationWrapper,
25+
Conversion, defaultConversion, defaultcoefficients, default_Fun, Multiplication, Derivative, Integral, bandwidths,
26+
ConcreteEvaluation, ConcreteDefiniteLineIntegral, ConcreteDefiniteIntegral, ConcreteIntegral,
27+
DefiniteLineIntegral, DefiniteIntegral, ConcreteDefiniteIntegral, ConcreteDefiniteLineIntegral, IntegralWrapper,
28+
ReverseOrientation, ReverseOrientationWrapper, ReverseWrapper, Reverse, NegateEven,
29+
Dirichlet, ConcreteDirichlet, DirichletWrapper,
30+
TridiagonalOperator, SubOperator, Space, @containsconstants, spacescompatible,
31+
hasfasttransform, canonicalspace, domain, setdomain, prectype, domainscompatible,
32+
plan_transform, plan_itransform, plan_transform!, plan_itransform!, transform, itransform, hasfasttransform,
33+
CanonicalTransformPlan, ICanonicalTransformPlan,
34+
Integral,
35+
domainspace, rangespace, boundary,
36+
union_rule, conversion_rule, maxspace_rule, conversion_type, maxspace, hasconversion, points,
37+
rdirichlet, ldirichlet, lneumann, rneumann, ivp, bvp,
38+
linesum, differentiate, integrate, linebilinearform, bilinearform,
39+
UnsetNumber, coefficienttimes, subspace_coefficients, sumspacecoefficients, specialfunctionnormalizationpoint,
40+
Segment, IntervalOrSegmentDomain, PiecewiseSegment, isambiguous, Vec, eps, isperiodic,
41+
arclength, complexlength,
42+
invfromcanonicalD, fromcanonical, tocanonical, fromcanonicalD, tocanonicalD, canonicaldomain, setcanonicaldomain, mappoint,
43+
reverseorientation, checkpoints, evaluate, mul_coefficients, coefficients, coefficientmatrix, isconvertible,
44+
clenshaw, ClenshawPlan, sineshaw,
45+
toeplitz_getindex, toeplitz_axpy!, sym_toeplitz_axpy!, hankel_axpy!, ToeplitzOperator, SymToeplitzOperator, hankel_getindex,
46+
SpaceOperator, ZeroOperator, InterlaceOperator,
47+
interlace!, reverseeven!, negateeven!, cfstype, pad!, alternatesign!, mobius,
48+
extremal_args, hesseneigvals, chebyshev_clenshaw, recA, recB, recC, roots,splitatroots,
49+
chebmult_getindex, intpow, alternatingsum,
50+
domaintype, diagindshift, rangetype, weight, isapproxinteger, default_Dirichlet, scal!, dotu,
51+
components, promoterangespace, promotedomainspace, choosedomainspace,
52+
block, blockstart, blockstop, blocklengths, isblockbanded, pointscompatible,
53+
AbstractProductSpace, MultivariateFun, BivariateSpace,
54+
@wrapperstructure, @wrapperspaces, @wrapper, @calculus_operator, resizedata!, slnorm,
55+
sample
56+
57+
import ApproxFunOrthogonalPolynomials: order
1058

1159
import DomainSets: Domain, indomain, UnionDomain, ProductDomain, FullSpace, Point, elements, DifferenceDomain,
1260
Interval, ChebyshevInterval, boundary, ∂, rightendpoint, leftendpoint,
@@ -16,7 +64,6 @@ import AbstractFFTs: Plan, fft, ifft
1664
import FFTW: plan_r2r!, fftwNumber, REDFT10, REDFT01, REDFT00, RODFT00, R2HC, HC2R,
1765
r2r!, r2r, plan_fft, plan_ifft, plan_ifft!, plan_fft!
1866

19-
2067
import Base: values, convert, getindex, setindex!, *, +, -, ==, <, <=, >, |, !, !=, eltype, iterate,
2168
>=, /, ^, \, , transpose, size, reindex, tail, broadcast, broadcast!, copyto!, copy, to_index, (:),
2269
similar, map, vcat, hcat, hvcat, show, summary, stride, sum, cumsum, sign, imag, conj, inv,
@@ -32,7 +79,7 @@ import Base: values, convert, getindex, setindex!, *, +, -, ==, <, <=, >, |, !,
3279
import Base.Broadcast: BroadcastStyle, Broadcasted, AbstractArrayStyle, broadcastable,
3380
DefaultArrayStyle, broadcasted
3481

35-
import Statistics: mean
82+
3683

3784
import LinearAlgebra: BlasInt, BlasFloat, norm, ldiv!, mul!, det, eigvals, dot, cross,
3885
qr, qr!, rank, isdiag, istril, istriu, issymmetric, ishermitian,
@@ -64,7 +111,6 @@ import BlockArrays: nblocks, blocksize, global2blockindex, globalrange, BlockSiz
64111

65112
import BandedMatrices: bandrange, bandshift,
66113
inbands_getindex, inbands_setindex!, bandwidth, AbstractBandedMatrix,
67-
flipsign,
68114
colstart, colstop, colrange, rowstart, rowstop, rowrange,
69115
bandwidths, _BandedMatrix, BandedMatrix
70116

@@ -82,11 +128,24 @@ import FillArrays: AbstractFill, getindex_value
82128
import LazyArrays: cache
83129
import InfiniteArrays: Infinity, InfRanges, AbstractInfUnitRange, OneToInf
84130

131+
"""
132+
`Curve` Represents a domain defined by the image of a Fun. Example
133+
usage would be
134+
135+
```julia
136+
x=Fun(1..2)
137+
Curve(exp(im*x)) # represents an arc
138+
```
139+
"""
140+
const Curve{S,T} = Union{IntervalCurve{S,T},PeriodicCurve{S,T}}
141+
Curve(f::Fun{<:Space{<:PeriodicDomain}}) = PeriodicCurve(f)
142+
143+
#TODO: Make type stable
144+
Curve(f::Fun{<:Space{<:ChebyshevInterval}}) = IntervalCurve(f)
85145

146+
export Curve
86147

87148

88-
# convenience for 1-d block ranges
89-
const BlockRange1 = BlockRange{1,Tuple{UnitRange{Int}}}
90149

91150
import Base: view
92151

@@ -95,42 +154,16 @@ import StaticArrays: StaticArray, SVector
95154

96155
import IntervalSets: (..), endpoints
97156

98-
const Vec{d,T} = SVector{d,T}
99-
100-
export pad!, pad, chop!, sample,
101-
complexroots, roots, svfft, isvfft,
102-
reverseorientation, jumplocations
103157

104158
##Testing
105159
export bisectioninv
106160

107-
export .., Interval, ChebyshevInterval, leftendpoint, rightendpoint, endpoints
108-
109-
110-
111-
include("LinearAlgebra/LinearAlgebra.jl")
112-
113-
114-
include("Fun/Fun.jl")
115-
116-
117-
include("Domains/Domains.jl")
118-
include("Multivariate/Multivariate.jl")
119-
include("Operators/Operator.jl")
120-
121-
include("Spaces/Spaces.jl")
122-
123-
124-
125161

126162
## Further extra features
127163

128-
include("PDE/PDE.jl")
129-
include("Caching/caching.jl")
130164
include("Extras/Extras.jl")
131165
include("Plot/Plot.jl")
132166
include("docs.jl")
133-
include("testing.jl")
134167

135168
#include("precompile.jl")
136169
#_precompile_()

0 commit comments

Comments
 (0)