ApproxFun
to evaluate the basis functions...
ApproxFun
might be useful. I noticed e.g. that restricting the degree in \
rather than the tolerance throws warnings even if it is intended. By “manual mode” I mean non-adaptive.
julia (v1.2)> f = Fun(cos);
julia (v1.2)> f(.1)
0.9950041652780257
julia (v1.2)> f(.1 + .1im)
0.0
julia (v1.2)> f(.1 + .0im)
0.9950041652780257 + 0.0im
julia (v1.2)> g = Fun(Chebyshev(), randn(Complex{Float64}, 20));
julia (v1.2)> g(.1)
2.1013219596855888 - 0.11052912191219874im
julia (v1.2)> g(.1 + .1im)
0.0 + 0.0im
julia (v1.2)> cos(.1 + .1im)
0.9999833333373015 - 0.00999998888888977im
Circle
or Segment
extrapolate(f,x)
in ApproxFun if you wish
using ApproxFun, Plots, LinearAlgebra
const c₀ = 3.0*10^8
d = Circle(0.0, 1.0, true) # Defines a circle
Δ = Laplacian(d) # Represent the Laplacian
f = ones(∂(d)) # one at the boundary
ω = Interval(0.0..10.0^9)
k = ω/c₀
u = \([Dirichlet(d); Δ+k*I], [f;0.]; # Solve the PDE
tolerance=1E-5)
surface(u) # Surface plot
I get the error 'Implement Laplacian(Laurant(:clock:), 1)'
When looking in to the code for ApproxFun, i can find no reference to the laplacian, only a confusing macro for implementing general derivative operators.
Where would I go to work out how to implement new Operators?
I was also wondering if it was yet possible to build spaces of arbitrary dimension to solve 3D PDEs, possibly with extra non spatial dimensions to represent free parameters
Disk()
? That sort of existed at one point but the code is crusty. We do have a version in MultivariateOrthogonalPolynomials.jl which uses @MikaelSlevinsky’s awesome FastTransform to do function approximation on the disk, but there’s no build script for that
PeriodicInterval
was updated to PeriodicSegment
in the source tree, but the Latest version at github.io is that out of date.