@@ -91,16 +91,17 @@ function init_linear_solver!(SC, A, b, timer)
9191 allocs_assembly = 0
9292
9393 if SC. linsolver === nothing
94- if SC. parameters[:verbosity ] > 0
95- @info " .... initializing linear solver ($(method_linear) )\n "
96- end
9794 @timeit timer " initialization" begin
9895 stats = @timed begin
9996 abstol = SC. parameters[:abstol ]
10097 reltol = SC. parameters[:reltol ]
10198 method_linear = SC. parameters[:method_linear ]
10299 precon_linear = SC. parameters[:precon_linear ]
103100
101+ if SC. parameters[:verbosity ] > 0
102+ @info " .... initializing linear solver ($(method_linear) )\n "
103+ end
104+
104105 LP = LinearProblem (A, b)
105106 if precon_linear != = nothing
106107 SC. linsolver = init (LP, method_linear; Pl = precon_linear (A), abstol, reltol)
@@ -296,13 +297,18 @@ function solve_linear_system!(A, b, sol, soltemp, residual, unknowns, freedofs,
296297 # # create block matrix
297298 if linsolve_needs_matrix
298299 if SC. parameters[:compress_restrictions ]
300+
301+ SC. parameters[:verbosity ] > 1 && @info " Compressing the restriction matrices..."
302+
299303 # combine all restriction matrices into one:
300304 combined_transposed_restriction_matrix = vcat (restriction_matrices' ... )
301305 combined_restriction_rhs = vcat (restriction_rhss... )
302306
303307 # compute rank revealing QR decomposition (of the transposed matrix)
304308 qr_result = qr (combined_transposed_restriction_matrix)
305309
310+ SC. parameters[:verbosity ] > 1 && @info " QR decomposition computed"
311+
306312 # extract components (from docs: Q*R = combined_transposed_restriction_matrix[prow, pcol])
307313 (; Q, R, prow, pcol) = qr_result
308314
@@ -332,6 +338,8 @@ function solve_linear_system!(A, b, sol, soltemp, residual, unknowns, freedofs,
332338 # update sizes
333339 block_sizes = [length (b_unrestricted), length (combined_restriction_rhs)]
334340 total_size = sum (block_sizes)
341+
342+ SC. parameters[:verbosity ] > 1 && @info " Created new CompressedRestriction"
335343 end
336344
337345 A_block = BlockMatrix (spzeros (Tv, total_size, total_size), block_sizes, block_sizes)
@@ -369,13 +377,17 @@ function solve_linear_system!(A, b, sol, soltemp, residual, unknowns, freedofs,
369377
370378 (n_row, n_col) = size (blocks (A_block))
371379
380+
381+ SC. parameters[:verbosity ] > 1 && @info " Assemble flat matrix out of blocks..."
372382 for i in 1 : n_row, j in 1 : n_col
373383 range_row = (lasts_row[i] + 1 ): lasts_row[i + 1 ]
374384 range_col = (lasts_col[j] + 1 ): lasts_col[j + 1 ]
375385
376386 # write each block directly in the resulting matrix
377387 A_flat[range_row, range_col] = A_block[Block (i, j)]
378388 end
389+ SC. parameters[:verbosity ] > 1 && @info " ... matrix assembly complete!"
390+
379391 linsolve_A = A_flat
380392 end
381393 end
0 commit comments