Closed
Description
I get an stackoverflow error when I try to apply an adjoint of a blockbanded operator on a function. For instance
Op=Derivative(Chebyshev())⊗Derivative(Chebyshev())
f=Fun(sin)⊗Fun(sin)
Op*f # works fine
Op'*f # Stackoverflow
I believe this is due to blockbandwidths(P::AdjointOperator)
not being implemented for adjoint operators (while bandwidths(P::AdjointOperator)
is implemented in OperatorLayout.jl) and thus the operator is not considered blockbanded. Indeed
println(ApproxFunBase.blockbandwidths(Op)) # (-2, 2)
println(ApproxFunBase.blockbandwidths(Op')) # (ℵ₀, ℵ₀)
The following implementation did the job for me:
ApproxFunBase.blockbandwidths(A::AdjointOperator) = reverse(ApproxFunBase.blockbandwidths(A.op))
println(ApproxFunBase.blockbandwidths(Op')) # (2,-2)
and Op'*f
works.
Metadata
Metadata
Assignees
Labels
No labels