FrontISTR  5.9.0
Large-scale structural analysis program with finit element method
hecmw_precond_SAAMG_smoother.F90 File Reference

Go to the source code of this file.

Modules

module  hecmw_precond_saamg_smoother
 Smoothed Aggregation AMG preconditioner : smoother building blocks.
 

Functions/Subroutines

subroutine, public hecmw_precond_saamg_smoother::hecmw_saamg_blockdiag_setup (A, D)
 Extract the nb x nb diagonal blocks of A, keep them, and store the explicit inverse D_i^{-1} of each via the BLAS-free block_inverse. Reads the block-CSR storage directly: the diagonal block of node inode is the stored block with bcol == inode (square operator, nb == mb), copied verbatim. The inverse is applied later as a small dense matmul (no per-block LAPACK call) AND computed here without LAPACK, so the whole block-diagonal setup is BLAS-free: no nested BLAS threading under OpenMP, and offloadable to OpenACC (no host-LAPACK call). Blocks are tiny (nb = 1/3/6) and well-conditioned (nodal stiffness diagonal). More...
 
subroutine, public hecmw_precond_saamg_smoother::hecmw_saamg_blockdiag_apply (D, x, y)
 Apply y = D^{-1} x (block-wise small dense matmul against the stored inverse). More...
 
subroutine, public hecmw_precond_saamg_smoother::hecmw_saamg_blockdiag_apply_bcsr (D, C, DC)
 Apply DC = D^{-1} C block-row-wise to a block-CSR matrix C (reusing the stored block LU). Each node block's nb rows are solved together by one multi-RHS triangular solve over the union of their columns, so a column present in any row of the block receives all nb output entries. Used for the SpGEMM-based prolongator smoothing P = P-hat - omega D^{-1}(A P-hat). More...
 
subroutine, public hecmw_precond_saamg_smoother::hecmw_saamg_blockdiag_apply_bcsr_inplace (D, C)
 Apply C <- D^{-1} C in place (each nb x mb block solved against the node's LU). Same as blockdiag_apply_bcsr but overwrites C, avoiding a full second operator (important for the large level-1 A P-hat product). More...
 
subroutine, public hecmw_precond_saamg_smoother::hecmw_saamg_blockdiag_matvec (D, x, y)
 Apply y = D x (block-wise dense matvec using the original blocks). More...
 
subroutine, public hecmw_precond_saamg_smoother::hecmw_saamg_blockdiag_free (D)
 
real(kind=kreal) function, public hecmw_precond_saamg_smoother::hecmw_saamg_tridiag_max_eig (diag, offd, m)
 Largest eigenvalue of a symmetric tridiagonal matrix (diagonal diag(1:m), sub/super-diagonal offd(1:m-1)) via LAPACK dsterf. Used by the Lanczos lambda_max estimators. Falls back to the largest diagonal entry (a Rayleigh quotient, hence a lower bound) if dsterf fails to converge. More...
 
real(kind=kreal) function, public hecmw_precond_saamg_smoother::hecmw_saamg_lanczos_lambda_max (A, D, niter)
 Estimate lambda_max(D^{-1}A) by D-inner-product Lanczos. M = D^{-1}A is self-adjoint in <u,v>_D = u^T D v, so a niter-step Lanczos builds a Krylov tridiagonal T whose largest eigenvalue (Ritz value) approximates lambda_max. Lanczos converges to the extreme eigenvalues far faster than power iteration, so a short run gives a reliable estimate even on large/ill-separated spectra (where power iteration underestimates and the Chebyshev smoother turns indefinite). Returns the RAW estimate; callers apply the safety factor. More...
 
subroutine, public hecmw_precond_saamg_smoother::hecmw_saamg_cheb_setup (lambda_hat, deg, alpha, cheb)
 Set Chebyshev interval [lmax/alpha, lmax] with lmax = 1.1 * lambda_hat. lambda_hat is the (already safety-scaled) shared estimate. More...
 
subroutine, public hecmw_precond_saamg_smoother::hecmw_saamg_cheb_apply_local (A, D, cheb, b, x, zero_init)
 Apply the Chebyshev smoother: x <- x + p_k(D^{-1}A)(b - A x). zero_init = .true. assumes x=0 on entry (skips the initial matvec). More...