#include <diago_cg.h>
|
| | DiagoCG (const std::string &basis_type, const std::string &calculation) |
| | DiagoCG (const std::string &basis_type, const std::string &calculation, const bool &need_subspace, const diag_comm_info &diag_comm, const Real &pw_diag_thr, const int &pw_diag_nmax) |
| | ~DiagoCG () |
| double | diag (const HSOperator< T, Device > &op, const int ld_psi, const int nband, const int dim, T *psi_in, Real *eigenvalue_in, const std::vector< double > ðr_band, const Real *prec=nullptr) |
|
| void | calc_grad (const ct::Tensor &prec, ct::Tensor &grad, ct::Tensor &hphi, ct::Tensor &sphi, ct::Tensor &pphi) |
| void | orth_grad (const ct::Tensor &psi, const int &m, ct::Tensor &grad, ct::Tensor &scg, ct::Tensor &lagrange) |
| void | calc_gamma_cg (const int &iter, const Real &cg_norm, const Real &theta, const ct::Tensor &prec, const ct::Tensor &scg, const ct::Tensor &grad, const ct::Tensor &phi_m, Real &gg_last, ct::Tensor &g0, ct::Tensor &cg) |
| bool | update_psi (const ct::Tensor &pphi, const ct::Tensor &cg, const ct::Tensor &scg, const double ðreshold, Real &cg_norm, Real &theta, Real &eigen, ct::Tensor &phi_m, ct::Tensor &sphi, ct::Tensor &hphi) |
| void | schmit_orth (const int &m, const ct::Tensor &psi, const ct::Tensor &sphi, ct::Tensor &phi_m) |
| void | diag_once (const ct::Tensor &prec, ct::Tensor &psi, ct::Tensor &eigen, const std::vector< double > ðr_band) |
| bool | test_exit_cond (const int &ntry, const int ¬conv) const |
| void | diag_subspace (const T *psi_in, T *psi_out, const int dim, const int nband, const bool S_orth) |
| | subspace rotation of the current nband vectors (packed, leading dimension dim)
|
◆ ct_Device
template<typename
T, typename Device = base_device::DEVICE_CPU>
◆ dot_real_op
template<typename
T, typename Device = base_device::DEVICE_CPU>
◆ Real
template<typename
T, typename Device = base_device::DEVICE_CPU>
◆ DiagoCG() [1/2]
template<typename
T, typename Device>
| hsolver::DiagoCG< T, Device >::DiagoCG |
( |
const std::string & | basis_type, |
|
|
const std::string & | calculation ) |
◆ DiagoCG() [2/2]
template<typename
T, typename Device>
| hsolver::DiagoCG< T, Device >::DiagoCG |
( |
const std::string & | basis_type, |
|
|
const std::string & | calculation, |
|
|
const bool & | need_subspace, |
|
|
const diag_comm_info & | diag_comm, |
|
|
const Real & | pw_diag_thr, |
|
|
const int & | pw_diag_nmax ) |
◆ ~DiagoCG()
template<typename
T, typename Device>
◆ calc_gamma_cg()
template<typename
T, typename Device>
◆ calc_grad()
template<typename
T, typename Device>
◆ diag()
template<typename
T, typename Device>
| double hsolver::DiagoCG< T, Device >::diag |
( |
const HSOperator< T, Device > & | op, |
|
|
const int | ld_psi, |
|
|
const int | nband, |
|
|
const int | dim, |
|
|
T * | psi_in, |
|
|
Real * | eigenvalue_in, |
|
|
const std::vector< double > & | ethr_band, |
|
|
const Real * | prec = nullptr ) |
record the times of trying iterative diagonalization
◆ diag_once()
template<typename
T, typename Device>
out : record for states of convergence
initialize variables
record for how many loops in cg convergence
◆ diag_subspace()
template<typename
T, typename Device>
| void DiagoCG::diag_subspace |
( |
const T * | psi_in, |
|
|
T * | psi_out, |
|
|
const int | dim, |
|
|
const int | nband, |
|
|
const bool | S_orth ) |
|
private |
subspace rotation of the current nband vectors (packed, leading dimension dim)
◆ orth_grad()
template<typename
T, typename Device>
◆ schmit_orth()
template<typename
T, typename Device>
◆ test_exit_cond()
template<typename
T, typename Device>
| bool DiagoCG::test_exit_cond |
( |
const int & | ntry, |
|
|
const int & | notconv ) const |
|
private |
◆ update_psi()
template<typename
T, typename Device>
◆ avg_iter_
template<typename
T, typename Device = base_device::DEVICE_CPU>
average iteration steps for cg diagonalization
◆ basis_type_
template<typename
T, typename Device = base_device::DEVICE_CPU>
◆ calculation_
template<typename
T, typename Device = base_device::DEVICE_CPU>
calculation type of ABACUS
◆ ctx_
template<typename
T, typename Device = base_device::DEVICE_CPU>
◆ diag_comm_
template<typename
T, typename Device = base_device::DEVICE_CPU>
communicator of the pool sharing the plane waves
◆ iter_band
template<typename
T, typename Device = base_device::DEVICE_CPU>
std::vector for iter count of each band
◆ n_band_
template<typename
T, typename Device = base_device::DEVICE_CPU>
inside variables and vectors, used by inside functions. row size for input psi matrix
◆ n_basis_
template<typename
T, typename Device = base_device::DEVICE_CPU>
col size for input psi matrix
◆ need_subspace_
template<typename
T, typename Device = base_device::DEVICE_CPU>
◆ neg_one_
template<typename
T, typename Device = base_device::DEVICE_CPU>
◆ notconv_
template<typename
T, typename Device = base_device::DEVICE_CPU>
static variables, used for passing control variables record for how many bands not have convergence eigenvalues
◆ one_
template<typename
T, typename Device = base_device::DEVICE_CPU>
◆ op_
template<typename
T, typename Device = base_device::DEVICE_CPU>
The H and S operator being diagonalized, set for the duration of diag().
◆ pw_diag_nmax_
template<typename
T, typename Device = base_device::DEVICE_CPU>
maximum iteration steps for cg diagonalization
◆ pw_diag_thr_
template<typename
T, typename Device = base_device::DEVICE_CPU>
threshold for cg diagonalization
◆ zero_
template<typename
T, typename Device = base_device::DEVICE_CPU>
The documentation for this class was generated from the following files:
- /home/runner/work/abacus-develop/abacus-develop/source/source_hsolver/diago_cg.h
- /home/runner/work/abacus-develop/abacus-develop/source/source_hsolver/diago_cg.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_hsolver/unittests/hsolver_pw_sup.h