|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <diago_iter_assist.h>
Static Public Member Functions | |
| static void | diag_subspace (const HSOperator< T, Device > &op, const T *psi, T *evc, const int nstart, const int n_band, const int dmin, const int dmax, Real *en, const diag_comm_info &diag_comm, const bool is_S_orthogonal=false) |
| Diagonalizes H in the subspace spanned by nstart vectors. | |
| static void | diag_subspace (const HSOperator< T, Device > &op, const psi::Psi< T, Device > &psi, psi::Psi< T, Device > &evc, Real *en, const diag_comm_info &diag_comm, int n_band=0, const bool is_S_orthogonal=false) |
| static void | diag_subspace_init (const HSOperator< T, Device > &op, const T *psi, int psi_nr, int psi_nc, psi::Psi< T, Device > &evc, Real *en, const std::string &basis_type, const std::string &calculation, const diag_comm_info &diag_comm) |
| subspace diagonalization used to build the starting wavefunction | |
| static void | diag_heevx (const int nstart, const int nbands, const T *hcc, const int ldh, Real *e, T *vcc) |
| static void | diag_hegvd (const int nstart, const int nbands, const T *hcc, T *sc, const int ldh, Real *e, T *vcc) |
| static void | cal_hs_subspace (const HSOperator< T, Device > &op, const psi::Psi< T, Device > &psi, T *hcc, T *scc, const diag_comm_info &diag_comm) |
| calculate Hamiltonian and overlap matrix in subspace spanned by nstart states psi | |
| static void | diag_responce (const T *hcc, T *scc, const int nbands, const T *mat_in, T *mat_out, int mat_col, Real *en) |
| calculate the response matrix from rotation matrix solved by diagonalization of H and S matrix | |
| static void | diag_subspace_psi (const T *hcc, T *scc, const int dim_subspace, psi::Psi< T, Device > &evc, Real *en) |
| calculate the response wavefunction psi from rotation matrix solved by diagonalization of H and S matrix | |
Static Public Attributes | |
| static Real | PW_DIAG_THR |
| static int | PW_DIAG_NMAX |
| static Real | avg_iter |
| average steps of last cg diagonalization for each band. | |
| static bool | need_subspace |
| static int | SCF_ITER |
Static Private Attributes | |
| static constexpr const Device * | ctx = {} |
| static T | one |
| static T | zero |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |
calculate Hamiltonian and overlap matrix in subspace spanned by nstart states psi
| op | : applies H and S |
| psi | : wavefunction |
| hcc | : Hamiltonian matrix |
| scc | : overlap matrix |
|
static |
|
static |
|
static |
calculate the response matrix from rotation matrix solved by diagonalization of H and S matrix
| hcc | : Hamiltonian matrix |
| scc | : overlap matrix |
| nbands | : number of bands |
| mat_in | : input matrix to be rotated |
| mat_out | : output matrix to be rotated |
| mat_col | : number of columns of target matrix |
| en | : eigenvalues |
|
static |
psi::Psi flavour of diag_subspace(): nstart = psi.get_nbands(), n_band = 0 means all of them, dimensions taken from psi.
|
static |
Diagonalizes H in the subspace spanned by nstart vectors.
Builds the nstart*nstart matrices <psi|H|psi> (and <psi|S|psi> unless the input is S-orthogonal), solves the small eigenproblem and rotates psi into the lowest n_band eigenvectors, written to evc.
| op | applies H and S to block vectors |
| psi | [in] nstart vectors, leading dimension dmax |
| evc | [out] n_band vectors, leading dimension dmax; may alias psi |
| nstart | number of input vectors |
| n_band | number of eigenvectors wanted (<= nstart) |
| dmin | active length of each vector |
| dmax | leading dimension of psi and evc |
| en | [out] n_band eigenvalues (host memory) |
| is_S_orthogonal | if true, psi is already S-orthonormal and the standard eigenproblem is solved instead of the generalized one |
|
static |
subspace diagonalization used to build the starting wavefunction
| op | interface to H and S; op.add_to_subspace_h() and op.export_subspace_vec() are called around the small eigenproblem |
| psi | vectors spanning the subspace |
| psi_nr | number of rows (nbands) |
| psi_nc | number of columns (nbasis) |
| evc | new wavefunction |
| en | eigenenergies |
| basis_type | "lcao", "lcao_in_pw" or "pw"; together with calculation it selects how the rotation matrix is applied to psi |
| calculation | "scf", "nscf", "md", "relax", ... |
|
static |
calculate the response wavefunction psi from rotation matrix solved by diagonalization of H and S matrix
|
static |
average steps of last cg diagonalization for each band.
|
staticconstexprprivate |
|
static |
|
staticprivate |
|
static |
|
static |
|
static |
|
staticprivate |