Skip to content

Commit a40c1c7

Browse files
committed
bandwidth for piecewise derivative
1 parent 234dd89 commit a40c1c7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Spaces/ProductSpaceOperators.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,11 @@ for (Op,OpWrap) in ((:Derivative,:DerivativeWrapper),(:Integral,:IntegralWrapper
227227
@inline function $_Op(S::PiecewiseSpace, k::Number)
228228
assert_integer(k)
229229
t = map(s->$Op(s,k),components(S))
230+
allbanded = all(isbanded, t)
231+
ds, rs = S, SumSpace(map(rangespace, t))
230232
D = Diagonal(convert_vector_or_svector(t))
231-
O = InterlaceOperator(D, PiecewiseSpace)
233+
bw = interlace_bandwidths(D, ds, rs, allbanded)
234+
O = InterlaceOperator(D, ds, rs, bw)
232235
$OpWrap(O,k)
233236
end
234237
@inline function $_Op(S::ArraySpace, k::Number)
@@ -257,7 +260,7 @@ end
257260
allbanded = all(isbanded, t)
258261
D = Diagonal(convert_vector_or_svector(t))
259262
ds, rs = S, SumSpace(map(rangespace, t))
260-
bw = interlace_bandwidths(D, ds, rs)
263+
bw = interlace_bandwidths(D, ds, rs, allbanded)
261264
O = InterlaceOperator(D, ds, rs, bw)
262265
DerivativeWrapper(O,k)
263266
else

0 commit comments

Comments
 (0)