@@ -61,7 +61,7 @@ C = [k/(k+1) for k in 0:N]
6161c = zeros (N); c[N] = 1
6262pts = vec ([z (θ, φ)⋅ y for θ in θ, φ in φ])
6363phi0 = ones (N* M)
64- F = reshape (FastTransforms. clenshaw! (c, A, B, C, pts, phi0, zeros (N * M) ), N, M)
64+ F = reshape (FastTransforms. clenshaw! (zeros (N * M), c, A, B, C, pts, phi0), N, M)
6565
6666# We superpose a surface plot of $f$ on top of the grid:
6767X = [sinpi (θ)* cospi (φ) for θ in θ, φ in φ]
@@ -91,7 +91,7 @@ U = threshold!(P\V, 400*eps())
9191nrm1 = norm (U)
9292
9393# Similarly, on the tensor product grid, our function samples are:
94- Pnxy = FastTransforms. clenshaw! (c, A, B, C, [x⋅ y], [1.0 ], [ 0 .0 ])[1 ]
94+ Pnxy = FastTransforms. clenshaw! ([ 0.0 ], c, A, B, C, [x⋅ y], [1.0 ])[1 ]
9595F = [(F[n, m] - Pnxy)/ (z (θ[n], φ[m])⋅ y - x⋅ y) for n in 1 : N, m in 1 : M]
9696
9797# We superpose a surface plot of $f$ on top of the grid:
@@ -108,7 +108,7 @@ U = threshold!(P\V, 400*eps())
108108
109109# Finally, the Legendre polynomial $P_n(z\cdot x)$ is aligned with the grid:
110110pts = vec ([z (θ, φ)⋅ x for θ in θ, φ in φ])
111- F = reshape (FastTransforms. clenshaw! (c, A, B, C, pts, phi0, zeros (N * M) ), N, M)
111+ F = reshape (FastTransforms. clenshaw! (zeros (N * M), c, A, B, C, pts, phi0), N, M)
112112
113113# We superpose a surface plot of $f$ on top of the grid:
114114scatter3d (vec (X), vec (Y), vec (Z); markersize= 1.25 , markercolor= :violetred )
0 commit comments