Skip to content

Commit 5017bab

Browse files
committed
Constructors in calculus operators
1 parent 86f8606 commit 5017bab

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Operators/banded/CalculusOperator.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,23 @@ macro calculus_operator(Op)
1818
space::S # the domain space
1919
order::OT
2020
end
21+
function $ConcOp{S,OT,T}(C::$ConcOp) where {S<:Space,OT,T}
22+
$ConcOp{S,OT,T}(strictconvert(S, C.space), strictconvert(OT, C.order))
23+
end
2124
struct $WrappOp{BT<:Operator,S<:Space,R<:Space,OT,T} <: $Op{S,OT,T}
2225
op::BT
2326
order::OT
2427
domainspace::S
2528
rangespace::R
2629
end
30+
function $WrappOp{BT,S,R,OT,T}(C::$WrappOp) where {BT<:Operator,S<:Space,R<:Space,OT,T}
31+
$WrappOp{BT,S,R,OT,T}(
32+
strictconvert(BT, C.op),
33+
strictconvert(OT, C.order),
34+
strictconvert(S, C.domainspace),
35+
strictconvert(R, C.rangespace),
36+
)
37+
end
2738

2839
ApproxFunBase.@wrapper $WrappOp false false
2940
ApproxFunBase.domainspace(A::$WrappOp) = A.domainspace

0 commit comments

Comments
 (0)