Skip to content

Commit 097dc70

Browse files
authored
HarmonicOrthogonalPolynomials-v0.1 (#75)
1 parent e2f60fa commit 097dc70

File tree

2 files changed

+13
-75
lines changed

2 files changed

+13
-75
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "MultivariateOrthogonalPolynomials"
22
uuid = "4f6956fd-4f93-5457-9149-7bfc4b2ce06d"
3-
version = "0.1.0"
3+
version = "0.1.1"
44

55
[deps]
66
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
@@ -33,7 +33,7 @@ ContinuumArrays = "0.7.3"
3333
DomainSets = "0.4"
3434
FastTransforms = "0.11, 0.12"
3535
FillArrays = "0.11"
36-
HarmonicOrthogonalPolynomials = "0.0.4, 0.0.5"
36+
HarmonicOrthogonalPolynomials = "0.0.4, 0.0.5, 0.1"
3737
InfiniteArrays = "0.10"
3838
InfiniteLinearAlgebra = "0.5"
3939
LazyArrays = "0.21"

examples/diskhelmholtz.jl

Lines changed: 11 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,18 @@
11
using MultivariateOrthogonalPolynomials, FastTransforms, BlockBandedMatrices, Plots
22
plotly()
3-
import MultivariateOrthogonalPolynomials: ZernikeITransform, grid, plotgrid
43

4+
Z = Zernike(1)
5+
W = Weighted(Z)
6+
xy = axes(Z,1); x,y = first.(xy),last.(xy)
7+
Δ = Z \ (Laplacian(xy) * W)
8+
S = Z \ W
9+
k = 2
10+
f = @.(cos(x*exp(y)))
11+
F = factorize+ k^2 * S)
12+
c = (Z \ f)
13+
F \ c
514

6-
Z = Zernike()[:,Block.(Base.OneTo(10))]
7-
g = grid(Z)
8-
θ = getproperty.(g[1,:],)
9-
[permutedims(RadialCoordinate.(1,θ)); g; permutedims(RadialCoordinate.(0,θ))]
10-
import Mul
15+
u = W * ((Δ + k^2 * S) \ (Z \ f))
1116

12-
plotgrid(Z)
13-
14-
15-
Z = Zernike()
16-
xy = axes(Z,1)
17-
x,y = first.(xy),last.(xy)
18-
u = Z * (Z \ @.(cos(10x*y)))
19-
surface(u)
20-
21-
@.(cos(10x*y))
22-
23-
plot(u)
24-
25-
g = plotgrid(Z[:,Block.(Base.OneTo(10))])
26-
surface(first.(g), last.(g), u[g])
27-
plot(u)
28-
29-
30-
G = grid(Z)
31-
32-
contourf(first.(G), last.(G), ones(size(G)...))
33-
34-
35-
scatter(vec(first.(G)), vec(last.(G)))
36-
G[1,1].θ
37-
38-
WZ = Weighted(Zernike(1))
39-
xy = axes(WZ,1)
40-
x,y = first.(xy),last.(xy)
41-
f = Zernike(1) \ @. exp(x*cos(y))
42-
43-
N = 50
44-
KR = Block.(Base.OneTo(N))
45-
Δ = (Zernike(1) \ (Laplacian(xy) * WZ))[KR,KR]
46-
C = (Zernike(1) \ WZ)[KR,KR]
47-
k = 5
48-
L = Δ - k^2 * C
49-
50-
v = f[KR]
51-
@time u = (L \ v);
52-
53-
g = MultivariateOrthogonalPolynomials.grid(Zernike(1)[:,KR])
54-
U = ZernikeITransform{Float64}(N, 0, 1) * u
55-
56-
plot(first.(g), last.(g), U)
57-
58-
59-
60-
F = factorize(Zernike(1)[:,KR]).plan
61-
F \ u
62-
u
63-
64-
65-
F*u
66-
67-
68-
F.plan \ v
69-
F |> typeof |> fieldnames
70-
71-
grid(WZ[:,KR])
72-
73-
F |>typeof |> fieldnames
74-
F.F * v
75-
76-
m = DiskTrav(v).matrix
77-
78-
plan_disk2cxf(m, 0, 0) * m
7917

8018

0 commit comments

Comments
 (0)