Skip to content

Commit 92ee2dd

Browse files
committed
Update sphere.jl
1 parent 9862a4a commit 92ee2dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/sphere.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ C = [k/(k+1) for k in 0:N]
6161
c = zeros(N); c[N] = 1
6262
pts = vec([z(θ, φ)y for θ in θ, φ in φ])
6363
phi0 = 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:
6767
X = [sinpi(θ)*cospi(φ) for θ in θ, φ in φ]
@@ -91,7 +91,7 @@ U = threshold!(P\V, 400*eps())
9191
nrm1 = norm(U)
9292

9393
# Similarly, on the tensor product grid, our function samples are:
94-
Pnxy = FastTransforms.clenshaw!(c, A, B, C, [xy], [1.0], [0.0])[1]
94+
Pnxy = FastTransforms.clenshaw!([0.0], c, A, B, C, [xy], [1.0])[1]
9595
F = [(F[n, m] - Pnxy)/(z(θ[n], φ[m])y - xy) 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:
110110
pts = 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:
114114
scatter3d(vec(X), vec(Y), vec(Z); markersize=1.25, markercolor=:violetred)

0 commit comments

Comments
 (0)