66function default_BlockBandedMatrix (S:: Operator )
77 ret = BlockBandedMatrix (Zeros, S)
88
9- @inbounds for J= Block ( 1 ) : Block ( nblocks ( ret,2 ) ), K= blockcolrange (ret,Int (J))
9+ @inbounds for J= blockaxes ( ret,2 ), K= blockcolrange (ret,Int (J))
1010 ret[K,J] = view (S,K,J)
1111 end
1212 ret
@@ -71,7 +71,7 @@ function CachedOperator(::Type{BlockBandedMatrix},op::Operator;padding::Bool=fal
7171 l,u= blockbandwidths (op)
7272 padding && (u+= l+ diagblockshift (op))
7373 data= BlockBandedMatrix {eltype(op)} (undef,
74- ( Vector {Int} (), Vector {Int} () ),
74+ Vector {Int} (), Vector {Int} (),
7575 (l,u))
7676 CachedOperator (op,data,(0 ,0 ),domainspace (op),rangespace (op),(- l,u),padding)
7777end
@@ -251,17 +251,16 @@ function resizedata!(QR::QROperator{CachedOperator{T,BlockBandedMatrix{T},
251251 bs = R. block_sizes
252252
253253 for j = QR. ncols+ 1 : col # first column of block
254- bi = global2blockindex (bs, (j, j)) # converts from global indices to block indices
255- K1, J1 = bi . I # this is the diagonal block corresponding to j
256- κ, ξ = bi . α
254+ bi = findblockindex . (bs. axes , (j, j)) # converts from global indices to block indices
255+ K1, J1 = Int .( block .(bi)) # this is the diagonal block corresponding to j
256+ κ, ξ = blockindex .(bi)
257257
258258 st = bs. block_strides[J1] # the stride of the matrix
259259 shft = bs. block_starts[K1,J1]- 1 + st* (ξ- 1 ) + κ- 1 # the index of the pointer to the j, j entry
260260
261261
262262 K_CS = Int (blockcolstop (R,J1)) # last row in J-th blockcolumn
263- k_end = globalrange (bs, (K_CS, J1))[1 ][end ]
264-
263+ k_end = last (bs. axes[1 ][Block (K_CS)])
265264
266265 w_j = W. cols[j] # the data index for the j-th column of W
267266 wp = w+ sz* (w_j- 1 ) # j-th column of W
@@ -278,7 +277,7 @@ function resizedata!(QR::QROperator{CachedOperator{T,BlockBandedMatrix{T},
278277 # scale rest of columns in first block
279278 # for ξ_2 = 2:
280279
281- for ξ_2 = ξ:blocksize (bs, 2 , J1)
280+ for ξ_2 = ξ:length (bs. axes[ 2 ][ Block ( J1)])
282281 # we now apply I-2v*v' in place
283282 r_sh = r+ sz* (shft + st* (ξ_2- ξ)) # the pointer the (j,ξ_2)-th entry
284283 dt = BandedMatrices. dot (M, wp, 1 , r_sh, 1 )
@@ -288,7 +287,7 @@ function resizedata!(QR::QROperator{CachedOperator{T,BlockBandedMatrix{T},
288287 for J = J1+ 1 : min (K1+ u,J_end)
289288 st = bs. block_strides[J]
290289 shft = bs. block_starts[K1,J] + κ- 2 # the index of the pointer to the j, j entry
291- for ξ_2 = 1 : blocksize (bs. block_sizes, 2 , J )
290+ for ξ_2 = axes (bs. axes[ 2 ][ Block (J)], 1 )
292291 # we now apply I-2v*v' in place
293292 # r_sh = r+sz*(shft + st*(ξ_2-1)) # the pointer the (j,ξ_2)-th entry
294293
0 commit comments