File tree Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 8
8
# We analyze the function on an $N\times M$ tensor product grid defined by:
9
9
# ```math
10
10
# \begin{aligned}
11
- # r_n & = \cos\left[(n+\tfrac{1}{2})\pi/2N],\quad{\rm for} 0\le n < N,\quad{\rm and}\\
11
+ # r_n & = \cos\left[(n+\tfrac{1}{2})\pi/2N\right ],\quad{\rm for} 0\le n < N,\quad{\rm and}\\
12
12
# \theta_m & = 2\pi m/M,\quad{\rm for}\quad 0\le m < M;
13
13
# \end{aligned}
14
14
# ```
Original file line number Diff line number Diff line change @@ -7,12 +7,14 @@ using FastTransforms
7
7
# We define the Padua points and extract Cartesian components:
8
8
N = 15
9
9
pts = paduapoints (N)
10
- x = pts[:,1 ];
11
- y = pts[:,2 ];
10
+ x = pts[:,1 ]
11
+ y = pts[:,2 ]
12
+ nothing # hide
12
13
13
14
# We take the Padua transform of the function:
14
15
f = (x,y) -> exp (x + cos (y))
15
- f̌ = paduatransform (f .(x , y));
16
+ f̌ = paduatransform (f .(x , y))
17
+ nothing # hide
16
18
17
19
# and use the coefficients to create an approximation to the function $f$:
18
20
f̃ = (x,y) -> begin
Original file line number Diff line number Diff line change 5
5
# ```
6
6
# for some $k\in\mathbb{R}^3$ and where $r\in\mathbb{S}^2$, using spin-$0$ spherical harmonics.
7
7
#
8
- # It applies $\dh$ , the spin-raising operator,
8
+ # It applies ð , the spin-raising operator,
9
9
# both on the spin-$0$ coefficients as well as the original function,
10
10
# followed by a spin-$1$ analysis to compare coefficients.
11
11
#
@@ -36,13 +36,13 @@ P = plan_spinsph2fourier(F, 0)
36
36
# And an FFTW Fourier analysis plan on $\mathbb{S}^2$:
37
37
PA = plan_spinsph_analysis (F, 0 )
38
38
39
- # Its spin-0 spherical harmonic coefficients are:
39
+ # Its spin-$0$ spherical harmonic coefficients are:
40
40
U⁰ = P\ (PA* F)
41
41
42
42
# We can check its $L^2(\mathbb{S}^2)$ norm against an exact result:
43
43
norm (U⁰) ≈ sqrt (4 π)
44
44
45
- # Spin can be incremented by applying $\dh$ , either on the spin-$0$ coefficients:
45
+ # Spin can be incremented by applying ð , either on the spin-$0$ coefficients:
46
46
U¹c = zero (U⁰)
47
47
for n in 1 : N- 1
48
48
U¹c[n, 1 ] = sqrt (n* (n+ 1 ))* U⁰[n+ 1 , 1 ]
Original file line number Diff line number Diff line change 11
11
# We analyze $f(x,y)$ on an $N\times M$ mapped tensor product grid defined by:
12
12
# ```math
13
13
# \begin{aligned}
14
- # x & = (1+u)/2,\quad{\rm and}\quad y = (1-u)* (1+v)/4,\quad {\rm where:}\\
14
+ # x & = (1+u)/2,\quad{\rm and}\quad y = (1-u)(1+v)/4,\quad {\rm where:}\\
15
15
# u_n & = \cos\left[(n+\tfrac{1}{2})\pi/N\right],\quad{\rm for}\quad 0\le n < N,\quad{\rm and}\\
16
16
# v_m & = \cos\left[(m+\tfrac{1}{2})\pi/M\right],\quad{\rm for}\quad 0\le m < M;
17
17
# \end{aligned}
You can’t perform that action at this time.
0 commit comments