ApproxFunExamples
ApproxFunExamples copied to clipboard
method error on julia 1.0
running Helmholtz rectangle PDE example on this page
https://github.com/JuliaApproximation/ApproxFunExamples/blob/master/PDEs/Rectangle%20PDEs.ipynb
d = (-1.0..1.0)^2
Δ = Laplacian(d)
@time u = \([Dirichlet(d);Δ+100I], [ones(∂(d));0]; tolerance=1E-5)
plot(u)
gives
MethodError: no method matching Dirichlet(::Interval{Float64})
Closest candidates are:
Dirichlet() at /Users/abradley/.julia/packages/ApproxFun/wFAIT/src/Operators/functionals/Evaluation.jl:181
Dirichlet(!Matched::Chebyshev, !Matched::Any) at /Users/abradley/.julia/packages/ApproxFun/wFAIT/src/Spaces/Chebyshev/ChebyshevOperators.jl:128
Dirichlet(!Matched::TensorSpace{Tuple{ChebyshevDirichlet{1,1,Segment{T},R1},ChebyshevDirichlet{1,1,Segment{T},R2}},D,R} where R where D, !Matched::Any) where {T, R1, R2} at /Users/abradley/.julia/packages/ApproxFun/wFAIT/src/Spaces/Ultraspherical/ContinuousSpace.jl:221
OK I'll look into it
The Poisson equation example finishes, but then
julia> plot(u)
ERROR: MethodError: no method matching Array{Fun{ChebyshevDirichlet{1,1,Segment{Float64},Float64},Float64,Array{Float64,1}},N} where N(::Int64)
Closest candidates are:
Array{Fun{ChebyshevDirichlet{1,1,Segment{Float64},Float64},Float64,Array{Float64,1}},N} where N(::UndefInitializer, ::Int64) where T at boot.jl:408
Array{Fun{ChebyshevDirichlet{1,1,Segment{Float64},Float64},Float64,Array{Float64,1}},N} where N(::UndefInitializer, ::Int64, ::Int64) where T at boot.jl:409
Array{Fun{ChebyshevDirichlet{1,1,Segment{Float64},Float64},Float64,Array{Float64,1}},N} where N(::UndefInitializer, ::Int64, ::Int64, ::Int64) where T at boot.jl:410
...
In the PDEs examples, syntax updated needed:
d = (-1.0..1.0)^2
seems to work if instead
d = Domain(-1.0..1.0)^2