![]() |
(git:f2099e5)
|
Block Davidson solvers for the lowest excitations of the Bethe-Salpeter equation on top of the matrix-free application of A and B: the TDA problem sum_jb A_ia,jb X_jb = Ω X_ia (bse_davidson_tda) and the full problem, either as sum_jb [(A+B)(A-B)]_ia,jb x_jb = Ω^2 x_ia (bse_davidson_abba_mk) or as the pair sum_jb (A+B)_ia,jb y_jb = Ω x_ia, sum_jb (A-B)_ia,jb x_jb = Ω y_ia (bse_davidson_abba_os). Every solver projects its problem onto an orthonormal basis, takes the lowest Ritz pairs, extends the basis by the preconditioned residuals of the roots still in need and restarts thick at the subspace ceiling; the helpers below are shared by the three drivers. More...
Functions/Subroutines | |
| subroutine, public | bse_davidson_tda (mv_env, bse_env, unit_nr, exc_ens, fm_x) |
| Block Davidson with thick restart for the NUM_EXC_EN lowest solutions of sum_jb A_ia,jb X_jb^n = Ω^n X_ia^n. With the orthonormal basis Z_ia,m the reduced matrix is Ar_mn = sum_ia Z_ia,m (A Z)_ia,n with eigenpairs (θ_k, c_mk), X_ia^k = sum_m Z_ia,m c_mk, and the basis grows by the corrections t_ia,k = r_ia,k/(d_ia - θ_k) of the residuals r_ia,k = sum_m (A Z)_ia,m c_mk - θ_k X_ia^k, d_ia being the diagonal chosen by PRECONDITIONER. Arrays: Ar_mn (the reduced A) in fm_red_A on the process grid, c_mk in coef_ritz, θ_k c_mk in coef_ritz_theta. | |
| subroutine, public | bse_davidson_abba_mk (mv_env, bse_env, unit_nr, exc_ens, fm_x, fm_y, abba_status, ab_margin, fm_x_tda) |
| Block Davidson with thick restart for the NUM_EXC_EN lowest solutions of the full problem, written as sum_jb [(A+B)(A-B)]_ia,jb x_jb^n = (Ω^n)^2 x_ia^n with x^n = X^n - Y^n, which is symmetric in the inner product <u,v> = sum_ia,jb u_ia (A-B)_ia,jb v_jb. The basis V_ia,m is orthonormal in that inner product, W_ia,m = sum_jb (A-B)_ia,jb V_jb,m, and the reduced matrix Hr_mn = sum_ia,jb W_ia,m (A+B)_ia,jb W_jb,n has the eigenpairs ((Ω^k)^2, c_mk). Then x_ia^k = (Ω^k)^1/2 sum_m V_ia,m c_mk and y_ia^k = (X^k+Y^k)_ia = (Ω^k)^-1/2 sum_m W_ia,m c_mk obey sum_ia x_ia^k y_ia^k = 1, the residual is r_ia,k = sum_jb (A+B)_ia,jb y_jb^k - Ω^k x_ia^k and the correction t_ia,k = r_ia,k/(d_ia^2 - (Ω^k)^2), d_ia chosen by PRECONDITIONER. Arrays: Hr_mn in fm_red_M on the process grid, c_mk in coef_ritz, (Ω^k)^1/2 c_mk in coef_x, (Ω^k)^-1/2 c_mk in coef_y, Ω^k (Ω^k)^1/2 c_mk in coef_x_omega. | |
| subroutine, public | bse_davidson_abba_os (mv_env, bse_env, unit_nr, exc_ens, fm_x, fm_y, abba_status, ab_margin, fm_x_tda) |
| Block Davidson with thick restart for the NUM_EXC_EN lowest solutions of the full problem in the paired form of Olsen and Stratmann: with x^n = X^n - Y^n, y^n = X^n + Y^n, M = A+B and K = A-B, sum_jb M_ia,jb y_jb^n = Ω^n x_ia^n and sum_jb K_ia,jb x_jb^n = Ω^n y_ia^n. One orthonormal basis b_ia,m carries both vectors: Mr_mn = sum_ia b_ia,m (M b)_ia,n and Kr_mn = sum_ia b_ia,m (K b)_ia,n are solved by solve_reduced_paired for Ω^k, R_mk and L_mk with y_ia^k = sum_m b_ia,m R_mk, x_ia^k = sum_m b_ia,m L_mk and sum_ia x_ia^k y_ia^k = 1. The basis grows by the corrections t_ia,k = r_ia,k/(d_ia - Ω^k) of both residuals, rR_ia,k = sum_m (M b)_ia,m R_mk - Ω^k x_ia^k and rL_ia,k = sum_m (K b)_ia,m L_mk - Ω^k y_ia^k, d_ia chosen by PRECONDITIONER; the rR block enters before the rL block, which is nearly parallel to it for a small B. Arrays: Mr_mn and Kr_mn in fm_red_M and fm_red_K on the process grid, R_mk in coef_right, L_mk in coef_left. | |
| subroutine, public | bse_davidson_refcheck (fm_a_explicit, exc_ens, fm_x, bse_env, unit_nr, fm_b_explicit, fm_y) |
| Debug check of a Davidson result against the full diagonalization of the explicit matrices: energies, and per multiplet the smallest singular value of X_ref^T X for the TDA, or of X_ref^T X - Y_ref^T Y for ABBA. ABBA diagonalizes the Hermitian reduction C = (A-B)^1/2 (A+B) (A-B)^1/2 with C T^n = (Ω^n)^2 T^n, (X+Y)^n = (Ω^n)^-1/2 (A-B)^1/2 T^n, (X-Y)^n = (Ω^n)^1/2 (A-B)^-1/2 T^n. A failed reference solve aborts: this is debug output with nothing to fall back on. | |
Variables | |
| integer, parameter, public | abba_ok = 0 |
| integer, parameter, public | abba_indefinite = 1 |
Block Davidson solvers for the lowest excitations of the Bethe-Salpeter equation on top of the matrix-free application of A and B: the TDA problem sum_jb A_ia,jb X_jb = Ω X_ia (bse_davidson_tda) and the full problem, either as sum_jb [(A+B)(A-B)]_ia,jb x_jb = Ω^2 x_ia (bse_davidson_abba_mk) or as the pair sum_jb (A+B)_ia,jb y_jb = Ω x_ia, sum_jb (A-B)_ia,jb x_jb = Ω y_ia (bse_davidson_abba_os). Every solver projects its problem onto an orthonormal basis, takes the lowest Ritz pairs, extends the basis by the preconditioned residuals of the roots still in need and restarts thick at the subspace ceiling; the helpers below are shared by the three drivers.
| subroutine, public bse_davidson::bse_davidson_tda | ( | type(bse_matvec_env_type), intent(in) | mv_env, |
| type(bse_env_type), intent(in) | bse_env, | ||
| integer, intent(in) | unit_nr, | ||
| real(kind=dp), dimension(:), intent(out), allocatable | exc_ens, | ||
| type(cp_fm_type), intent(out) | fm_x ) |
Block Davidson with thick restart for the NUM_EXC_EN lowest solutions of sum_jb A_ia,jb X_jb^n = Ω^n X_ia^n. With the orthonormal basis Z_ia,m the reduced matrix is Ar_mn = sum_ia Z_ia,m (A Z)_ia,n with eigenpairs (θ_k, c_mk), X_ia^k = sum_m Z_ia,m c_mk, and the basis grows by the corrections t_ia,k = r_ia,k/(d_ia - θ_k) of the residuals r_ia,k = sum_m (A Z)_ia,m c_mk - θ_k X_ia^k, d_ia being the diagonal chosen by PRECONDITIONER. Arrays: Ar_mn (the reduced A) in fm_red_A on the process grid, c_mk in coef_ritz, θ_k c_mk in coef_ritz_theta.
| mv_env | slabs, prefactors and transition energies of the matrix-free A |
| bse_env | bse_env carries the BSE_ITERAT settings and BSE_DEBUG_PRINT |
| unit_nr | output unit, positive on the writing rank only |
| exc_ens | Ω^n in Hartree |
| fm_X | X_ia^n on the process grid of mv_env, column n |
Definition at line 104 of file bse_davidson.F.
| subroutine, public bse_davidson::bse_davidson_abba_mk | ( | type(bse_matvec_env_type), intent(in) | mv_env, |
| type(bse_env_type), intent(in) | bse_env, | ||
| integer, intent(in) | unit_nr, | ||
| real(kind=dp), dimension(:), intent(out), allocatable | exc_ens, | ||
| type(cp_fm_type), intent(out) | fm_x, | ||
| type(cp_fm_type), intent(out) | fm_y, | ||
| integer, intent(out) | abba_status, | ||
| real(kind=dp), intent(out) | ab_margin, | ||
| type(cp_fm_type), intent(in), optional | fm_x_tda ) |
Block Davidson with thick restart for the NUM_EXC_EN lowest solutions of the full problem, written as sum_jb [(A+B)(A-B)]_ia,jb x_jb^n = (Ω^n)^2 x_ia^n with x^n = X^n - Y^n, which is symmetric in the inner product <u,v> = sum_ia,jb u_ia (A-B)_ia,jb v_jb. The basis V_ia,m is orthonormal in that inner product, W_ia,m = sum_jb (A-B)_ia,jb V_jb,m, and the reduced matrix Hr_mn = sum_ia,jb W_ia,m (A+B)_ia,jb W_jb,n has the eigenpairs ((Ω^k)^2, c_mk). Then x_ia^k = (Ω^k)^1/2 sum_m V_ia,m c_mk and y_ia^k = (X^k+Y^k)_ia = (Ω^k)^-1/2 sum_m W_ia,m c_mk obey sum_ia x_ia^k y_ia^k = 1, the residual is r_ia,k = sum_jb (A+B)_ia,jb y_jb^k - Ω^k x_ia^k and the correction t_ia,k = r_ia,k/(d_ia^2 - (Ω^k)^2), d_ia chosen by PRECONDITIONER. Arrays: Hr_mn in fm_red_M on the process grid, c_mk in coef_ritz, (Ω^k)^1/2 c_mk in coef_x, (Ω^k)^-1/2 c_mk in coef_y, Ω^k (Ω^k)^1/2 c_mk in coef_x_omega.
| mv_env | slabs, prefactors and transition energies of the matrix-free A and B |
| bse_env | bse_env carries the BSE_ITERAT settings and BSE_DEBUG_PRINT |
| unit_nr | output unit, positive on the writing rank only |
| exc_ens | Ω^n in Hartree |
| fm_X | X_ia^n on the process grid of mv_env, column n; created only for abba_ok |
| fm_Y | Y_ia^n, as fm_X |
| abba_status | abba_indefinite if A-B is not positive definite on the trial space |
| ab_margin | smallest eigenvalue of A-B on the trial space in Hartree |
| fm_X_tda | converged TDA vectors as initial guess |
Definition at line 318 of file bse_davidson.F.
| subroutine, public bse_davidson::bse_davidson_abba_os | ( | type(bse_matvec_env_type), intent(in) | mv_env, |
| type(bse_env_type), intent(in) | bse_env, | ||
| integer, intent(in) | unit_nr, | ||
| real(kind=dp), dimension(:), intent(out), allocatable | exc_ens, | ||
| type(cp_fm_type), intent(out) | fm_x, | ||
| type(cp_fm_type), intent(out) | fm_y, | ||
| integer, intent(out) | abba_status, | ||
| real(kind=dp), intent(out) | ab_margin, | ||
| type(cp_fm_type), intent(in), optional | fm_x_tda ) |
Block Davidson with thick restart for the NUM_EXC_EN lowest solutions of the full problem in the paired form of Olsen and Stratmann: with x^n = X^n - Y^n, y^n = X^n + Y^n, M = A+B and K = A-B, sum_jb M_ia,jb y_jb^n = Ω^n x_ia^n and sum_jb K_ia,jb x_jb^n = Ω^n y_ia^n. One orthonormal basis b_ia,m carries both vectors: Mr_mn = sum_ia b_ia,m (M b)_ia,n and Kr_mn = sum_ia b_ia,m (K b)_ia,n are solved by solve_reduced_paired for Ω^k, R_mk and L_mk with y_ia^k = sum_m b_ia,m R_mk, x_ia^k = sum_m b_ia,m L_mk and sum_ia x_ia^k y_ia^k = 1. The basis grows by the corrections t_ia,k = r_ia,k/(d_ia - Ω^k) of both residuals, rR_ia,k = sum_m (M b)_ia,m R_mk - Ω^k x_ia^k and rL_ia,k = sum_m (K b)_ia,m L_mk - Ω^k y_ia^k, d_ia chosen by PRECONDITIONER; the rR block enters before the rL block, which is nearly parallel to it for a small B. Arrays: Mr_mn and Kr_mn in fm_red_M and fm_red_K on the process grid, R_mk in coef_right, L_mk in coef_left.
| mv_env | slabs, prefactors and transition energies of the matrix-free A and B |
| bse_env | bse_env carries the BSE_ITERAT settings and BSE_DEBUG_PRINT |
| unit_nr | output unit, positive on the writing rank only |
| exc_ens | Ω^n in Hartree |
| fm_X | X_ia^n on the process grid of mv_env, column n; created only for abba_ok |
| fm_Y | Y_ia^n, as fm_X |
| abba_status | abba_indefinite if A-B is not positive definite on the trial space |
| ab_margin | smallest eigenvalue of A-B on the trial space in Hartree |
| fm_X_tda | converged TDA vectors as initial guess, x = y = X |
Definition at line 608 of file bse_davidson.F.
| subroutine, public bse_davidson::bse_davidson_refcheck | ( | type(cp_fm_type), intent(in) | fm_a_explicit, |
| real(kind=dp), dimension(:), intent(in) | exc_ens, | ||
| type(cp_fm_type), intent(in) | fm_x, | ||
| type(bse_env_type), intent(in) | bse_env, | ||
| integer, intent(in) | unit_nr, | ||
| type(cp_fm_type), intent(in), optional | fm_b_explicit, | ||
| type(cp_fm_type), intent(in), optional | fm_y ) |
Debug check of a Davidson result against the full diagonalization of the explicit matrices: energies, and per multiplet the smallest singular value of X_ref^T X for the TDA, or of X_ref^T X - Y_ref^T Y for ABBA. ABBA diagonalizes the Hermitian reduction C = (A-B)^1/2 (A+B) (A-B)^1/2 with C T^n = (Ω^n)^2 T^n, (X+Y)^n = (Ω^n)^-1/2 (A-B)^1/2 T^n, (X-Y)^n = (Ω^n)^1/2 (A-B)^-1/2 T^n. A failed reference solve aborts: this is debug output with nothing to fall back on.
| fm_A_explicit | A from create_A_and_B, N_ov x N_ov |
| exc_ens | Davidson energies in Hartree |
| fm_X | Davidson X_ia^n, column n |
| bse_env | handed to create_hermitian_form_of_ABBA |
| unit_nr | output unit, positive on the writing rank only |
| fm_B_explicit | present for an ABBA result, together with fm_Y |
| fm_Y | Davidson Y_ia^n, with fm_B_explicit |
Definition at line 2882 of file bse_davidson.F.
| integer, parameter, public bse_davidson::abba_ok = 0 |
Definition at line 80 of file bse_davidson.F.
| integer, parameter, public bse_davidson::abba_indefinite = 1 |
Definition at line 80 of file bse_davidson.F.