Skip to content

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

@ikirill

Description

@ikirill

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions