Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiplication of derivative operator and a multiplication operator doesn't work #616

Open
ikirill opened this issue Oct 14, 2018 · 0 comments · May be fixed by JuliaApproximation/ApproxFunBase.jl#145

Comments

@ikirill
Copy link
Contributor

ikirill commented Oct 14, 2018

From gitter:

julia> I = Interval(0,1); x = Fun(identity, I); ∂ = Derivative(I);

julia> ∂ * Multiplication(x)
ERROR: AssertionError: spacescompatible(domainspace(ops[k]), rangespace(ops[k + 1]))
Stacktrace:
 [1] TimesOperator{Float64,Tuple{ApproxFun.Infinity{Bool},ApproxFun.Infinity{Bool}}}(::Array{Operator{Float64},1}, ::Tuple{ApproxFun.Infinity{Bool},ApproxFun.Infinity{Bool}}) at /Users/kirill/.julia/packages/ApproxFun/wFAIT/src/Operators/general/algebra.jl:237
 [2] TimesOperator(::Array{Operator{Float64},1}, ::Tuple{ApproxFun.Infinity{Bool},ApproxFun.Infinity{Bool}}) at /Users/kirill/.julia/packages/ApproxFun/wFAIT/src/Operators/general/algebra.jl:271
 [3] TimesOperator(::Array{Operator{Float64},1}) at /Users/kirill/.julia/packages/ApproxFun/wFAIT/src/Operators/general/algebra.jl:274
 [4] promotetimes(::Array{Operator{Float64},1}, ::ApproxFun.UnsetSpace) at /Users/kirill/.julia/packages/ApproxFun/wFAIT/src/Operators/general/algebra.jl:324
 [5] promotetimes(::Array{Operator{Float64},1}) at /Users/kirill/.julia/packages/ApproxFun/wFAIT/src/Operators/general/algebra.jl:328
 [6] *(::ApproxFun.ConcreteDerivative{Chebyshev{Segment{Float64},Float64},Int64,Float64}, ::ApproxFun.ConcreteMultiplication{Chebyshev{Segment{Float64},Float64},ApproxFun.UnsetSpace,Float64}) at /Users/kirill/.julia/packages/ApproxFun/wFAIT/src/Operators/general/algebra.jl:535
 [7] top-level scope at none:0

# But this works:
julia> ∂[x]
TimesOperator:Chebyshev(【0.0,1.0】)→Ultraspherical(1,【0.0,1.0】)
 1.0  1.0  0.5   ⋅    ⋅    ⋅    ⋅    ⋅    ⋅    ⋅   ⋅
  ⋅   1.0  2.0  1.0   ⋅    ⋅    ⋅    ⋅    ⋅    ⋅   ⋅
  ⋅    ⋅   1.5  3.0  1.5   ⋅    ⋅    ⋅    ⋅    ⋅   ⋅
  ⋅    ⋅    ⋅   2.0  4.0  2.0   ⋅    ⋅    ⋅    ⋅   ⋅
  ⋅    ⋅    ⋅    ⋅   2.5  5.0  2.5   ⋅    ⋅    ⋅   ⋅
  ⋅    ⋅    ⋅    ⋅    ⋅   3.0  6.0  3.0   ⋅    ⋅   ⋅
  ⋅    ⋅    ⋅    ⋅    ⋅    ⋅   3.5  7.0  3.5   ⋅   ⋅
  ⋅    ⋅    ⋅    ⋅    ⋅    ⋅    ⋅   4.0  8.0  4.0  ⋅
  ⋅    ⋅    ⋅    ⋅    ⋅    ⋅    ⋅    ⋅   4.5  9.0  ⋱
  ⋅    ⋅    ⋅    ⋅    ⋅    ⋅    ⋅    ⋅    ⋅   5.0  ⋱
  ⋅    ⋅    ⋅    ⋅    ⋅    ⋅    ⋅    ⋅    ⋅    ⋅   ⋱

julia> versioninfo()
Julia Version 1.0.1
Commit 0d713926f8 (2018-09-29 19:05 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin14.5.0)
  CPU: Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, haswell)

julia> Pkg.status()
    Status `~/.julia/environments/v1.0/Project.toml`
  [28f2ccd6] ApproxFun v0.9.0
... etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant