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 new classes of fast transforms with low
6
-
pre-computation. One approach is based on the use of asymptotic formulae to
7
-
relate the transforms to a small number of fast Fourier transforms. Another
8
-
approach is based on a Toeplitz-dot-Hankel decomposition of the matrix of
9
-
connection coefficients. Both new classes of fast transforms do not
10
-
require large pre-computation for fast execution and they are designed
11
-
to work on expansions of functions with any degree of regularity.
12
-
13
-
The Chebyshev—Jacobi transform and its inverse are implemented. This
14
-
allows the fast conversion of Chebyshev expansion coefficients to Jacobi expansion
15
-
coefficients and back.
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.
12
+
16
13
```julia
17
14
julia> Pkg.add("FastTransforms")
18
15
19
16
julia>using FastTransforms
20
17
21
18
julia> c =rand(10001);
22
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.
@@ -43,15 +75,61 @@ is valid for the half-open square `(α,β) ∈ (-1/2,1/2]^2`. Therefore, the fas
43
75
when the parameters are inside. If the parameters `(α,β)` are not exceptionally beyond the square,
44
76
then increment/decrement operators are used with linear complexity (and linear conditioning) in the degree.
45
77
46
-
The Padua transform and its inverse are also implemented thanks to
47
-
[Michael Clarke](https://github.com/MikeAClarke). These are optimized methods
48
-
designed for computing the bivariate Chebyshev coefficients by interpolating a
49
-
bivariate function at the Padua points on `[-1,1]^2`.
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!
50
122
51
123
# References:
52
124
53
-
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.
54
132
55
-
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.
56
134
57
-
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.
It may be necessary to transform our representation to one in a new basis, say, ``\{\psi_m(x)\}_{m\ge0}``:
10
+
```math
11
+
f(x) \sim \sum_{m=0}^{\infty} g_m \psi_m(x).
12
+
```
13
+
In many cases of interest, both representations are of finite length ``n`` and we seek a fast method (faster than ``\mathcal{O}(n^2)``) to transform the original coefficients ``f_{\ell}`` to the new coefficients ``g_m``.
14
+
15
+
A similar problem arises when we wish to evaluate ``f`` at a set of points ``\{x_m\}_{m=0}^n``. We wish to transform coefficients of ``f`` to values at the set of points in fewer than ``\mathcal{O}(n^2)`` operations.
0 commit comments