You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The aim of this package is to provide a new class of fast transforms
6
-
based on the use of asymptotic formulae to relate the transforms to a small
7
-
number of fast Fourier transforms. This new class of fast transforms does not
8
-
require large pre-computation for fast execution, and they are designed
9
-
to work on expansions of functions with any degree of regularity.
5
+
The aim of this package is to provide fast orthogonal polynomial transforms that are designed for expansions of functions with any degree of regularity. There are multiple approaches to the classical connection problem, though the user does not need to know the specifics.
6
+
7
+
One approach is based on the use of asymptotic formulae to relate the transforms to a small number of fast Fourier transforms. Another approach is based on a Toeplitz-dot-Hankel decomposition of the matrix of connection coefficients. Alternatively, the matrix of connection coefficients may be decomposed hierarchically à la Fast Multipole Method.
8
+
9
+
## The Chebyshev—Legendre Transform
10
+
11
+
The Chebyshev—Legendre transform allows the fast conversion of Chebyshev expansion coefficients to Legendre expansion coefficients and back.
10
12
11
-
The Chebyshev—Jacobi transform and its inverse are implemented. This
12
-
allows the fast conversion of Chebyshev expansion coefficients to Jacobi expansion
13
-
coefficients and back.
14
13
```julia
15
14
julia> Pkg.add("FastTransforms")
16
15
17
16
julia>using FastTransforms
18
17
19
18
julia> c =rand(10001);
20
19
20
+
julia>leg2cheb(c);
21
+
22
+
julia>cheb2leg(c);
23
+
24
+
julia>norm(cheb2leg(leg2cheb(c))-c)
25
+
5.564168202018823e-13
26
+
```
27
+
28
+
The implementation separates pre-computation into a type of plan. This type is constructed with either `plan_leg2cheb` or `plan_cheb2leg`. Let's see how much faster it is if we pre-compute.
29
+
30
+
```julia
31
+
julia> p1 =plan_leg2cheb(c);
32
+
33
+
julia> p2 =plan_cheb2leg(c);
34
+
35
+
julia>@timeleg2cheb(c);
36
+
0.082615 seconds (11.94 k allocations:31.214 MiB, 6.75% gc time)
37
+
38
+
julia>@time p1*c;
39
+
0.004297 seconds (6 allocations:78.422 KiB)
40
+
41
+
julia>@timecheb2leg(c);
42
+
0.110388 seconds (11.94 k allocations:31.214 MiB, 8.16% gc time)
43
+
44
+
julia>@time p2*c;
45
+
0.004500 seconds (6 allocations:78.422 KiB)
46
+
```
47
+
48
+
## The Chebyshev—Jacobi Transform
49
+
50
+
The Chebyshev—Jacobi transform allows the fast conversion of Chebyshev expansion coefficients to Jacobi expansion coefficients and back.
@@ -41,10 +75,61 @@ is valid for the half-open square `(α,β) ∈ (-1/2,1/2]^2`. Therefore, the fas
41
75
when the parameters are inside. If the parameters `(α,β)` are not exceptionally beyond the square,
42
76
then increment/decrement operators are used with linear complexity (and linear conditioning) in the degree.
43
77
78
+
## The Padua Transform
79
+
80
+
The Padua transform and its inverse are implemented thanks to [Michael Clarke](https://github.com/MikeAClarke). These are optimized methods designed for computing the bivariate Chebyshev coefficients by interpolating a bivariate function at the Padua points on `[-1,1]^2`.
81
+
82
+
```julia
83
+
julia> n =200;
84
+
85
+
julia> N =div((n+1)*(n+2),2);
86
+
87
+
julia> v =rand(N); # The length of v is the number of Padua points
Let `F` be a matrix of spherical harmonic expansion coefficients arranged by increasing order in absolute value, alternating between negative and positive orders. Then `sph2fourier` converts the representation into a bivariate Fourier series, and `fourier2sph` converts it back.
As with other fast transforms, `plan_sph2fourier` saves effort by caching the pre-computation. Be warned that for dimensions larger than `1,000`, this is no small feat!
122
+
44
123
# References:
45
124
46
-
1. N. Hale and A. Townsend. <ahref="http://dx.doi.org/10.1137/130932223">A fast, simple, and stable Chebyshev—Legendre transform using and asymptotic formula</a>, SIAM J. Sci. Comput., 36:A148—A167, 2014.
125
+
[1] B. Alpert and V. Rokhlin. <ahref="http://dx.doi.org/10.1137/0912009">A fast algorithm for the evaluation of Legendre expansions</a>, *SIAM J. Sci. Stat. Comput.*, **12**:158—179, 1991.
126
+
127
+
[2] N. Hale and A. Townsend. <ahref="http://dx.doi.org/10.1137/130932223">A fast, simple, and stable Chebyshev—Legendre transform using and asymptotic formula</a>, *SIAM J. Sci. Comput.*, **36**:A148—A167, 2014.
128
+
129
+
[3] J. Keiner. <ahref="http://dx.doi.org/10.1137/070703065">Computing with expansions in Gegenbauer polynomials</a>, *SIAM J. Sci. Comput.*, **31**:2151—2171, 2009.
130
+
131
+
[4] R. M. Slevinsky. <ahref="https://doi.org/10.1093/imanum/drw070">On the use of Hahn's asymptotic formula and stabilized recurrence for a fast, simple, and stable Chebyshev—Jacobi transform</a>, in press at *IMA J. Numer. Anal.*, 2017.
47
132
48
-
2. R. M. Slevinsky. <ahref="http://arxiv.org/abs/1602.02618">On the use of Hahn's asymptotic formula and stabilized recurrence for a fast, simple, and stable Chebyshev—Jacobi transform</a>, arXiv:1602.02618, 2016.
133
+
[5]R. M. Slevinsky. <ahref="https://arxiv.org/abs/1705.05448">Fast and backward stable transforms between spherical harmonic expansions and bivariate Fourier series</a>, arXiv:1705.05448, 2017.
49
134
50
-
3. A. Townsend, M. Webb, and S. Olver. <ahref="http://arxiv.org/abs/1604.07486">Fast polynomial transforms based on Toeplitz and Hankel matrices</a>, arXiv:1604.07486, 2016.
135
+
[6]A. Townsend, M. Webb, and S. Olver. <ahref="https://doi.org/10.1090/mcom/3277">Fast polynomial transforms based on Toeplitz and Hankel matrices</a>, in press at *Math. Comp.*, 2017.
0 commit comments