(git:cd2a8c4)
Loading...
Searching...
No Matches
bse_matvec.F File Reference

Go to the source code of this file.

Data Types

type  bse_matvec::bse_matvec_env_type
 RI slabs of one spin channel, every rank holding n_ri_loc whole RI slices. More...

Modules

module  bse_matvec
 Matrix-free application of the BSE matrices A and B to trial vectors from RI slabs that are sliced along the RI index over all MPI ranks.

Functions/Subroutines

subroutine, public bse_matvec::bse_matvec_create (mv_env, fm_s_ia, fm_s_bar_ij, fm_s_ab, fm_s_bar_ia, eps_reduced, homo, virt, alpha, w_fac, do_abba, unit_nr, block_cols)
 Moves the RI slabs onto an npe x 1 process grid, such that every rank owns whole RI slices, and stores them as local 3-index arrays: the contraction over each P in bse_matvec_apply is then a local DGEMM and only the final sum over P crosses the ranks.
subroutine, public bse_matvec::bse_matvec_release (mv_env)
 Frees the sliced slabs, the transition energies and the process grid of mv_env.
subroutine, public bse_matvec::bse_matvec_vector_struct (mv_env, ncol_global, fm_struct)
 Matrix structure of a block of trial vectors: rows ia distributed, all columns local.
subroutine, public bse_matvec::bse_matvec_apply (mv_env, fm_z, first_col, ncol, fm_az, fm_bz, first_col_bz)
 Applies A (and B) to ncol trial vectors without forming an N_ov x N_ov object, (A Z)_ia = (ε_a-ε_i) Z_ia + α sum_P B^P_ia sum_jb B^P_jb Z_jb - w sum_Pjb \bar{B}^P_ij B^P_ab Z_jb (B Z)_ia = α sum_P B^P_ia sum_jb B^P_jb Z_jb - w sum_Pjb \bar{B}^P_ib B^P_ja Z_jb α: exchange prefactor (2 singlet, 0 triplet), w: prefactor of the screened term, \bar{B}: slab bound by the caller of bse_matvec_create (B itself for TDHF and ALPHA screening, sum_Q [1+Q(0)]^-1_PQ B^Q otherwise); the sums over P run over the local RI slices and are completed by a sum over the ranks.
subroutine, public bse_matvec::bse_matvec_diagonal (mv_env, precond_kind, diag)
 Diagonal used by the Davidson correction, either ε_a-ε_i or the full diagonal A_ia,ia = ε_a-ε_i + α sum_P (B^P_ia)^2 - w sum_P \bar{B}^P_ii B^P_aa with α, w and \bar{B} as in bse_matvec_apply.
subroutine, public bse_matvec::bse_matvec_subblock (mv_env, ia_list, a_sub, b_sub)
 Exact A (and B) on a list of transitions, replicated on every rank, A_kl = δ_kl (ε_a-ε_i) + α sum_P B^P_ia B^P_jb - w sum_P \bar{B}^P_ij B^P_ab B_kl = α sum_P B^P_ia B^P_jb - w sum_P \bar{B}^P_ib B^P_ja with k = (i,a), l = (j,b) and α, w, \bar{B} as in bse_matvec_apply.
subroutine, public bse_matvec::bse_matvec_selfcheck (mv_env, fm_a_explicit, unit_nr, fm_b_explicit)
 Debug check of the matrix-free application against the explicit matrices A (and B), dev = max_ia,k |(A Z)_ia,k - sum_jb A_ia,jb Z_jb,k| over up to eight unit vectors Z_ia,k = δ_ia,k and one dense vector Z_ia = sin(ia), the same for B, and max_ia |d_ia - A_ia,ia| for the diagonal.

Variables

real(kind=dp), parameter, public bse_matvec::mem_fraction = 0.5_dp